DSANet icon indicating copy to clipboard operation
DSANet copied to clipboard

No `train_dataloader()` method defined.

Open 13121283123 opened this issue 4 years ago • 2 comments

大佬 非常感谢您公开的代码 我想引用您的文章 但是我在运行代码的时候遇到以下问题 请问这个是什么原因导致的 pytorch_lightning.utilities.exceptions.MisconfigurationException: No train_dataloader() method defined. Lightning Trainer expects as minimum a training_step(), train_dataloader() and configure_optimizers() to be defined. 非常感谢您的回复

13121283123 avatar Jun 03 '20 01:06 13121283123

@13121283123 不好意思。距离写这份代码的时间太长了,加上 pytorch_lightning 版本迭代了太多次,不太清楚如何解决这个问题。如果实在想使用,建议自行把 pytorch_lightning 的部分剥离然后写一个训练的过程。其实应该我来做这个事情的,但是最近实在是太忙,希望之后有时间能上传一份重写的代码。

bighuang624 avatar Jun 03 '20 11:06 bighuang624

@bighuang624 i followed this: https://www.kaggle.com/kirichenko17roman/dsanet-approach#New-confirmed-cases-prediction using the last version of pytorch_lightning return the error of this issue but with 0.7.3 its working.

also the kaggle version use the a gpu version so im wondering if you release also the .py for the gpu because im having an hard time using their code, i dont understand all the conversion from dataframe to np array for the training data and how to get test the model at the end

lorrp1 avatar Sep 16 '20 14:09 lorrp1