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
run_recbole(dataset='ml-100k', model='DCN')
会报错,错误如下:
Traceback (most recent call last):
File "/home/hzx/PycharmProjects/fedrec/examples/run_recbole.py", line 15, in
run_recbole(model=args.model, dataset=args.dataset, config_file_list=config_file_list)
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/recbole/quick_start/quick_start.py", line 56, in run_recbole
best_valid_score, best_valid_result = trainer.fit(
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/recbole/trainer/trainer.py", line 335, in fit
train_loss = self._train_epoch(train_data, epoch_idx, show_progress=show_progress)
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/recbole/trainer/trainer.py", line 181, in _train_epoch
losses = loss_func(interaction)
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/recbole/model/context_aware_recommender/dcn.py", line 119, in calculate_loss
return self.loss(output, label) + l2_loss
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/loss.py", line 612, in forward
return F.binary_cross_entropy(input, target, weight=self.weight, reduction=self.reduction)
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/functional.py", line 3065, in binary_cross_entropy
return torch._C._nn.binary_cross_entropy(input, target, weight, reduction_enum)
RuntimeError: all elements of input should be between 0 and 1
Process finished with exit code 1
其他模型都成功了,只有DCN模型出错
The text was updated successfully, but these errors were encountered:
根据RecBole的知乎https://zhuanlan.zhihu.com/p/273251140,写了一个run.py
from recbole.quick_start import run_recbole
run_recbole(dataset='ml-100k', model='DCN')
会报错,错误如下:
Traceback (most recent call last):
File "/home/hzx/PycharmProjects/fedrec/examples/run_recbole.py", line 15, in
run_recbole(model=args.model, dataset=args.dataset, config_file_list=config_file_list)
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/recbole/quick_start/quick_start.py", line 56, in run_recbole
best_valid_score, best_valid_result = trainer.fit(
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/recbole/trainer/trainer.py", line 335, in fit
train_loss = self._train_epoch(train_data, epoch_idx, show_progress=show_progress)
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/recbole/trainer/trainer.py", line 181, in _train_epoch
losses = loss_func(interaction)
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/recbole/model/context_aware_recommender/dcn.py", line 119, in calculate_loss
return self.loss(output, label) + l2_loss
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/loss.py", line 612, in forward
return F.binary_cross_entropy(input, target, weight=self.weight, reduction=self.reduction)
File "/home/hzx/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/functional.py", line 3065, in binary_cross_entropy
return torch._C._nn.binary_cross_entropy(input, target, weight, reduction_enum)
RuntimeError: all elements of input should be between 0 and 1
Process finished with exit code 1
其他模型都成功了,只有DCN模型出错
The text was updated successfully, but these errors were encountered: