
如果冻结了权值,需要再设置回来
model.requires_grad_(True)
发生以下两种错误,应该都是这个原因
ValueError: need at least one array to concatenate RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
官方代码&教程
pytorch-grad-cam
欢迎分享,转载请注明来源:内存溢出

如果冻结了权值,需要再设置回来
model.requires_grad_(True)
发生以下两种错误,应该都是这个原因
ValueError: need at least one array to concatenate RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
官方代码&教程
pytorch-grad-cam
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)