TF1.4는 Keras를 필수 부품으로 만들었습니다. Propratery 입력 기능 (즉, tf.estimator.inputs.numpy_input_fn을 사용하지 않음)을 사용하여 Keras 모델에서 Estimator를 만들려고하면 Tensorflow가 입력 기능으로 모델을 통합 할 수 없으므로 작동하지 않습니다.Tensorflow : Keras, 견적 및 사용자 정의 입력 기능
나는 tf.keras.estimator.model_to_estimator
keras_estimator = tf.keras.estimator.model_to_estimator(
keras_model = keras_model,
config = run_config)
train_spec = tf.estimator.TrainSpec(input_fn=train_input_fn,
max_steps=self.train_steps)
eval_spec = tf.estimator.EvalSpec(input_fn=eval_input_fn,
steps=None)
tf.estimator.train_and_evaluate(keras_estimator, train_spec, eval_spec)
를 사용하고 나는 다음과 같은 오류 메시지가 얻을 : 이상하게도 그에 숨겨진 (나는이 주제 here에 대한 몇 가지 기준을 발견
Cannot find %s with name "%s" in Keras Model. It needs to match '
'one of the following:
을 마스터 지점의 TF 문서 - this과 비교하십시오.
같은 문제가있는 경우 - 내 대답을 참조하십시오. 몇 시간을 절약 할 수 있습니다.