tried that. I’m still getting the same error. May be because ‘output’ is also a list of tensors? I tried casting output the same way. but I get a new error now:

ValueError: only one element tensors can be converted to Python scalars