Tracer cannot set value trace for type None. Supported types are tensor, tensor list, and tuple of tensors
代码:
@torch.jit.script_method
def forward(self, x):
解决:
必须有返回值。
@torch.jit.script_method
def forward(self, x):
return aaa
Tracer cannot set value trace for type None. Supported types are tensor, tensor list, and tuple of tensors
代码:
@torch.jit.script_method
def forward(self, x):
解决:
必须有返回值。
@torch.jit.script_method
def forward(self, x):
return aaa