赞
踩
1、UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
解决:
将
theta_init_new = torch.tensor(theta, dtype=torch.float32, requires_grad=True)
改为
theta_init_new = torch.as_tensor(theta, dtype=torch.float32, requires_grad=True)
2、‘bool’ object is not iterable
解决:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。