onehaitao / Att-BLSTM-relation-extraction

Implementation of Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification.
MIT License
76 stars 17 forks source link

TypeError: __collate_fn() #8

Open 6shuaishuai opened 10 months ago

6shuaishuai commented 10 months ago

python = 3.6 pytorch = 1.3.0 After python run.py, show this error massage

Traceback (most recent call last): File ".\run.py", line 105, in train(model, criterion, loader, config) File ".\run.py", line 39, in train for step, (data, label) in enumerate(train_loader): File "C:\Users\90607.conda\envs\Att-BLSTM-relation-extraction-master\lib\site-packages\torch\utils\data\dataloader.py", line 346, in next data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\Users\90607.conda\envs\Att-BLSTM-relation-extraction-master\lib\site-packages\torch\utils\data_utils\fetch.py", line 47, in fetch return self.collate_fn(data) TypeError: __collate_fn() takes 1 positional argument but 2 were given

onehaitao commented 8 months ago

I think you can see this issue, maybe useful to you.