机器学习估计器训练步骤无法在终端中显示

问题描述

我正在尝试在 tensorflow 中构建一个线性分类器,下面是我的代码:

model = tf.estimator.LinearClassifier(
  n_classes = 2,model_dir = "ongoing",feature_columns = categorical_features + continuous_features ///these are the feature columns
)

FEATURES = ['Age','Gender','ICD9Code']
LABEL = 'Condition'

def get_input_fn(data_set,num_epochs,n_batch,shuffle):
    input = tf.compat.v1.estimator.inputs.pandas_input_fn(
       x = pd.DataFrame({k: data_set[k].values for k in FEATURES}),# x = data_dic,y = pd.Series(data_set[LABEL].values),batch_size = n_batch,num_epochs = num_epochs,shuffle = shuffle
     )
    return input

model.train(
  input_fn = get_input_fn(csv_data,num_epochs = 40,n_batch = 10461,shuffle = False
  ),steps = 1000
)

得到这样的终端,你能帮忙解决这个问题吗?谢谢!

附言我的 tensorflow 版本是 2.4.1

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)