You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loading pre-trained backbone network...
Initializing dataset and model...
Initializing base dataset... (name: foods)
Training model...
Traceback (most recent call last):
File "train.py", line 109, in
main()
File "train.py", line 75, in main
train_base(args, train_loader, model, optimizer, epoch)
File "/home/bigdata11/pzw/MASKER/training/base.py", line 27, in train_base
out_cls = model(tokens) # (B, C)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/bigdata11/pzw/MASKER/models.py", line 48, in forward
out_p = self.dropout(out_p)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/modules/dropout.py", line 58, in forward
return F.dropout(input, self.p, self.training, self.inplace)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/functional.py", line 983, in dropout
else _VF.dropout(input, p, training))
TypeError: dropout(): argument 'input' (position 1) must be Tensor, not str
The text was updated successfully, but these errors were encountered:
I have the same problem. It's beacuse of wrong version of transfomers.#1392
But after changing transformers' version, the torch will report a error: ImportError: cannot import name 'SAVE_STATE_WARNING' from 'torch.optim.lr_scheduler' when running preprocess.py( torch-1.9.0)
I run the following code:
python train.py --dataset foods --split_ratio 0.25 --seed 0
--train_type base
--backbone bert --classifier_type softmax --optimizer adam_vanilla \
Encountered the following problem:
Loading pre-trained backbone network...
Initializing dataset and model...
Initializing base dataset... (name: foods)
Training model...
Traceback (most recent call last):
File "train.py", line 109, in
main()
File "train.py", line 75, in main
train_base(args, train_loader, model, optimizer, epoch)
File "/home/bigdata11/pzw/MASKER/training/base.py", line 27, in train_base
out_cls = model(tokens) # (B, C)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/bigdata11/pzw/MASKER/models.py", line 48, in forward
out_p = self.dropout(out_p)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/modules/dropout.py", line 58, in forward
return F.dropout(input, self.p, self.training, self.inplace)
File "/home/bigdata11/anaconda3/envs/pzw/lib/python3.6/site-packages/torch/nn/functional.py", line 983, in dropout
else _VF.dropout(input, p, training))
TypeError: dropout(): argument 'input' (position 1) must be Tensor, not str
The text was updated successfully, but these errors were encountered: