Start train 3 ford
Calling BertTokenizer.from_pretrained() with the path to a single file or url is deprecated
The current process just got forked. Disabling parallelism to avoid deadlocks...
To disable this warning, please explicitly set TOKENIZERS_PARALLELISM=(true | false)
The current process just got forked. Disabling parallelism to avoid deadlocks...
To disable this warning, please explicitly set TOKENIZERS_PARALLELISM=(true | false)
Inference:: 0%|| 42/17221 [00:02<14:48, 19.34it/s]
Traceback (most recent call last):
File "train.py", line 215, in
print(trainer.inference(val_data_loader))
File "train.py", line 53, in inference
for i, data in data_iter:
File "/home/ccit19/anaconda3/envs/liuzhe/lib/python3.7/site-packages/tqdm/std.py", line 1129, in iter
for obj in iterable:
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 63, in default_collate
return {key: default_collate([d[key] for d in batch]) for key in batch[0]}
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 63, in
return {key: default_collate([d[key] for d in batch]) for key in batch[0]}
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 43, in default_collate
return torch.stack(batch, 0, out=out)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 152 and 158 in dimension 1 at /pytorch/aten/src/TH/generic/THTensor.cpp:711
Start train 3 ford Calling BertTokenizer.from_pretrained() with the path to a single file or url is deprecated The current process just got forked. Disabling parallelism to avoid deadlocks... To disable this warning, please explicitly set TOKENIZERS_PARALLELISM=(true | false) The current process just got forked. Disabling parallelism to avoid deadlocks... To disable this warning, please explicitly set TOKENIZERS_PARALLELISM=(true | false) Inference:: 0%|| 42/17221 [00:02<14:48, 19.34it/s] Traceback (most recent call last): File "train.py", line 215, in
print(trainer.inference(val_data_loader))
File "train.py", line 53, in inference
for i, data in data_iter:
File "/home/ccit19/anaconda3/envs/liuzhe/lib/python3.7/site-packages/tqdm/std.py", line 1129, in iter
for obj in iterable:
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 63, in default_collate
return {key: default_collate([d[key] for d in batch]) for key in batch[0]}
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 63, in
return {key: default_collate([d[key] for d in batch]) for key in batch[0]}
File "/home/ccit19/anaconda3/envs/liuz-1.1/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 43, in default_collate
return torch.stack(batch, 0, out=out)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 152 and 158 in dimension 1 at /pytorch/aten/src/TH/generic/THTensor.cpp:711
请问有解决方案吗