Neu-Review-Rec
Neu-Review-Rec copied to clipboard
DAML模型疑问
DAML模型训练没问题,测试加载时候报错:
raceback (most recent call last):
File "", line 1, in
--train : python3 main.py train --dataset=Patio_Lawn_and_Garden_data --model=DAML --num_fea=1 --output=fm
--error
euclidean = (user_local_fea - item_local_fea.permute(0, 1, 3, 2)).pow(2).sum(1).sqrt()
RuntimeError: CUDA out of memory. Tried to allocate 5.94 GiB (GPU 0; 10.76 GiB total capacity; 6.17 GiB already allocated; 3.82 GiB free; 6.18 GiB reserved in total by PyTorch)
Please tell me where the error is.
@yinzhiqiangluvlzx 你好, 我刚刚测试下,没有问题;我的训练代码:
python3 main.py train --model=DAML --num_fea=2 --batch_size=16
测试脚本为:
python3 main.py test --model=DAML --num_fea=2 --batch_size=16 --pth_path='./checkpoints/DAML_Digital_Music_data_defau
lt.pth'
看报错信息应该是你那边一些参数没有修改,导致训练和测试不一致。
恩,谢谢大佬回信,我改好batch_size可以运行了 2080ti 11g 运行太慢了,想用三块一起跑,但是模型保存出错,这部分应该怎么解决呢?我把这个问题提到另一个DAML的issues里了 在2020年12月23日 14:33,HT Liu[email protected] 写道:
@yinzhiqiangluvlzx 你好, 我刚刚测试下,没有问题;我的训练代码:
python3 main.py train --model=DAML --num_fea=2 --batch_size=16
测试脚本为:
python3 main.py test --model=DAML --num_fea=2 --batch_size=16 --pth_path='./checkpoints/DAML_Digital_Music_data_defau
lt.pth'
看报错信息应该是你那边一些参数没有修改,导致训练和测试不一致。
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
@FKCHAN 在那个issue里面已经提到, 多卡模型的save与单卡有点不同, https://pytorch.org/tutorials/beginner/saving_loading_models.html#saving-torch-nn-dataparallel-models
后期的计划, 用pytorch-lightning 包装下模型,更好更简单的支持并行训练。 预计春节前做。
好的,那我就先一边训练一遍测试了,期待中,大佬加油,fighting!
在2020年12月23日 14:41,HT Liu[email protected] 写道:
@FKCHAN 在那个issue里面已经提到, 多卡模型的save与单卡有点不同, https://pytorch.org/tutorials/beginner/saving_loading_models.html#saving-torch-nn-dataparallel-models
后期的计划, 用pytorch-lightning 包装下模型,更好更简单的支持并行训练。 预计春节前做。
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.