我是TFLearn的新手,我正在尝试实施这个DNN:
x_train = df_train[["Pclass", "Gender", "Age","SibSp", "Parch"]]
y_train = df_train ["Survived"]
x_test = df_test[["Pclass", "Gender", "Age","SibSp", "Parch"]]
y_test = df_test[["Survived"]]
net = tflearn.input_data(shape=[None , 6])
net = tflearn.fully_connected(net, 1)
net = tflearn.fully_connected(net, 2, activation='softmax')
net = tflearn.regression(net)
model = tflearn.DNN(net)
model.fit(x_train, y_train, n_epoch=10, show_metric=True)
当我运行 model.fit 时,我收到错误 IndexError:indices is out-of-bounds 。我想这个问题是关于列" name"的导入,网络试图在标题中详细说明字符串,但我不确定。 我想念一些明显的东西吗? 谢谢你的帮助!