TensorFlow icon indicating copy to clipboard operation
TensorFlow copied to clipboard

Lab 06-1 Softmax Classification Eager예제에서 compile오류

Open globalq64 opened this issue 5 years ago • 1 comments

[Lab 06-1 Softmax Classification Eager]의 마지막 예제 [# Convert as Class]

Tensorflow 2.0으로 코드수정하여 실행하고 있습니다. 앞부분은 문제없이 실행됩니다만, 마지막 Class예제 실행과정에서 다음오류 발생했습니다.

RuntimeError: You must compile your model before training/testing. Use model.compile(optimizer, loss).

의견 부탁드립니다. 감사합니다.

globalq64 avatar Nov 26 '19 05:11 globalq64

indentation 오류가 있어서 fit 함수를 class 안으로 넣어주셔야 합니다. 그리고 fit 함수 내부에 loss_fn을 cost_fn으로 수정하시면 됩니다. 곧 수정 반영해드리겠습니다

jwlee-ml avatar Jan 19 '20 01:01 jwlee-ml