np.array(training_set.data)},y=np.array(training_set.target),num_epochs=None,shuffle=True)#Trainmodel.classifier.train
将input_fn数据传递给您的模型 要将数据提供给您的模型进行培训,只需将您创建的输入函数train作为input_fn参数的值传递给您的操作,例如: classifier.train(input_fn
将以下代码添加到main(): #CreatetheEstimatormnist_classifier=tf.estimator.Estimator(model_fn=cnn_model_fn,model_dir
fromtensorflow.pythonimportdebugastf_debug#CreateaLocalCLIDebugHookanduseitasamonitorwhencallingfit().hooks=[tf_debug.LocalCLIDebugHook()]classifier.fit