-
카테고리
-
세부 분야
컴퓨터 비전
-
해결 여부
미해결
NameError
20.04.19 20:34 작성 조회수 358
0
# convert class vectors to binary class matrices
y_train = tf.keras.utils.to_categorical(y_train, num_classes)
y_test = tf.keras.utils.to_categorical(y_test, num_classes)
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-17-1f535d7b0dc0> in <module> 1 # convert class vectors to binary class matrices ----> 2 y_train = tf.keras.utils.to_categorical(y_train, num_classes) 3 y_test = tf.keras.utils.to_categorical(y_test, num_classes) NameError: name 'num_classes' is not defined
답변을 작성해보세요.
0
노마드크리에이터
지식공유자2020.04.19
안녕하세요?
이 프로그램이 RBP_DL11_MNIST_model.ipynb의 내용인가요?
그렇다면 Jupyter notebook에서 두번째 노드를 실행하지 않은것 같습니다.
# Define Constants
batch_size = 128
num_classes = 10
epochs = 100
다시한번 순서대로 한 단계씩 실행하시기 바랍니다.
그리고 지난 번에도 말씀 드린 것 같은데 저에게 구글검색하는 것처럼 에러로그만 보내주시지 않았으면 합니다.
질문하실 때는 문제가 최소한 어떤 내용이고 어떤 프로그램에서 에러가 생겼는지 정도는 부연설명해 주셨으면 합니다.
감사합니다.
답변 1