localrf icon indicating copy to clipboard operation
localrf copied to clipboard

ERROR : cannot assign 'torch.cuda.FloatTensor' object to parameter '0' (torch.nn.Parameter or None required)

Open Dragonkingpan opened this issue 1 year ago • 1 comments

train.py this line: self.r_c2w.append(torch.eye(3, 2, device=self.device))

error:

Traceback (most recent call last): File "D:\aiPrjs\localrf\localrf-main\localTensoRF\train.py", line 609, in
reconstruction(args) File "D:\aiPrjs\localrf\localrf-main\localTensoRF\train.py", line 252, in reconstruction
local_tensorfs = LocalTensorfs( File "D:\aiPrjs\localrf\localrf-main\localTensoRF\local_tensorfs.py", line 92, in init self.append_frame() File "D:\aiPrjs\localrf\localrf-main\localTensoRF\local_tensorfs.py", line 148, in append_frame self.r_c2w.append(torch.eye(3, 2, device=self.device)) File "D:\aiPrjs\env-faceswap\nope-nerf\lib\site-packages\torch\nn\modules\container.py", line 458, in append self.register_parameter(str(len(self)), parameter) File "D:\aiPrjs\env-faceswap\nope-nerf\lib\site-packages\torch\nn\modules\module.py", line 321, in register_parameter raise TypeError("cannot assign '{}' object to parameter '{}' " TypeError: cannot assign 'torch.cuda.FloatTensor' object to parameter '0' (torch.nn.Parameter or None required)

Dragonkingpan avatar Jun 20 '23 08:06 Dragonkingpan

It looks like you are using a different environment. Could you please list installed python packages and their versions?

ameuleman avatar Jun 20 '23 21:06 ameuleman

I met the same error. Is the cause of this problem the version of the python package? I have the package and version as shown PixPin_2024-04-10_19-44-11

curryandklay avatar Apr 10 '24 11:04 curryandklay