DataFrame object has no attribute...
blog.csdn.net › w_w_w_1_2_3 › articleNov 19, 2020 · pandas报DataFrame object has no attribute 'dim'解决办法 train_df = pd.read_csv('../Titanic/train.csv') X_train = train_df.drop("Survived", axis=1) 利用神经网络训练时报错,DataFrame object has no attribute ‘dim’ 解决方法: x_train = torch.from_numpy(np.array(X_train)) 将Dataframe转化为numpy数组即可 卑微打工仔罢了 关注关注 2 点赞 踩 0 评论 2 收藏