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
after nl_denoiser.patch_denoise_net.load_state_dict(model_state0['state_dict']) in blind_denoise_bw_small.py. However, I ran into issue like:
RuntimeError: Could not cast attribute 'arch_opt' to type torch.modules.ArchitectureOptions (of Python compilation unit at: 0x518f410): Could not cast attribute 'rgb' to type Tensor: Unable to cast Python instance to C++ type (compile in debug mode for details)
I tried adding @torch.jit.script in front of class ArchitectureOptions but the same error occurred. Is there solution for this? Thank you!
The text was updated successfully, but these errors were encountered:
yuanyaoshen
changed the title
Could not cast attribute 'arch_opt' to type __torch__.modules.ArchitectureOptions
Python ScriptModule: Could not cast attribute 'arch_opt' to type __torch__.modules.ArchitectureOptions
Jul 13, 2022
I am trying to convert a pytorch module to ScriptModule. What I was trying to do is adding
after
nl_denoiser.patch_denoise_net.load_state_dict(model_state0['state_dict'])
in blind_denoise_bw_small.py. However, I ran into issue like:RuntimeError: Could not cast attribute 'arch_opt' to type torch.modules.ArchitectureOptions (of Python compilation unit at: 0x518f410): Could not cast attribute 'rgb' to type Tensor: Unable to cast Python instance to C++ type (compile in debug mode for details)
I tried adding
@torch.jit.script
in front ofclass ArchitectureOptions
but the same error occurred. Is there solution for this? Thank you!The text was updated successfully, but these errors were encountered: