import tensorflow as tf
import pandas as pd
a = [[1,1],[2,2],[3,3]]
b = [11,22,33]
mydata = pd.DataFrame({'images':a,'labels':b})
feature_columns = [tf.feature_column.numeric_column('images',shape=[1,1])]
train_input_fn = tf.estimator.inputs.pandas_input_fn(x =mydata,
y=mydata['labels'],
batch_size=60,
num_epochs=1,
shuffle=True)
estimator = tf.estimator.DNNClassifier(hidden_units=[64,32,16],
feature_columns=feature_columns,
n_classes=2)
estimator.train(input_fn=train_input_fn,steps=100)
Я получаю ошибку
INFO:tensorflow:Create CheckpointSaverHook.
INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InternalError'>, Unable to get element as bytes.
INFO:tensorflow:Saving checkpoints for 0 into /tmp/tmptver1w_k/model.ckpt.
TypeError Traceback (most recent call last)
TypeError: expected bytes, list found
чтение через несколько страниц stackoverflow и github ... он должен что-то делать с saving_listeners
. Но не в состоянии понять это.
Пожалуйста, помогите.