songyouwei / ABSA-PyTorch

Aspect Based Sentiment Analysis, PyTorch Implementations. 基于方面的情感分析,使用PyTorch实现。
MIT License
1.99k stars 522 forks source link

关于train_k_fold_cross_val.py的问题 #216

Open justonli opened 1 year ago

justonli commented 1 year ago

您好,我在运行train_k_fold_cross_val.py时,显示在 self.model.load_state_dict(torch.load(best_model_path))那里

报错AttributeError: 'NoneType' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead.

我是换成自己数据集后运行报错的,使用原本的数据集时不会报错 我考虑过是为自己数据集的问题,但是在train.py里使用自己的数据集并不会报错,所以我想问下我要怎么解决这个报错问题呢,是新手所以不太懂怎样解决 谢谢

whateverdude66 commented 1 year ago

请问解决了吗?我也遇到这个问题了,如果解决了能告知一下吗?谢谢!