Closed dxjjhm closed 3 years ago
set use_gpu false, but when run, it is using cuda. recbole/model/sequential_recommender/bert4rec.py", line 210, in calculate_loss
@dxjjhm We have already fixed this bug in #556 and we will fix this bug in next version.
` from recbole.quick_start import run_recbole
if name == 'main': param_dict = { "gpu_id": 1, "use_gpu": False }
` run then throw Error Follow as
File "/data/home/c/anaconda3/envs/pytorch/lib/python3.7/site-packages/recbole/quick_start/quick_start.py", line 52, in run_recbole best_valid_score, best_valid_result = trainer.fit(train_data, valid_data, saved=saved) File "/data/home/c/anaconda3/envs/pytorch/lib/python3.7/site-packages/recbole/trainer/trainer.py", line 245, in fit train_loss = self._train_epoch(train_data, epoch_idx) File "/data/home/c/anaconda3/envs/pytorch/lib/python3.7/site-packages/recbole/trainer/trainer.py", line 144, in _train_epoch losses = loss_func(interaction) File "/data/home/c/anaconda3/envs/pytorch/lib/python3.7/site-packages/recbole/model/sequential_recommender/bert4rec.py", line 210, in calculate_loss seq_output = torch.bmm(pred_index_map, seq_output) # [B mask_len H] RuntimeError: Expected object of device type cuda but got device type cpu for argument #2 'mat2' in call to _th_bmm_out