AttributeError: ‘list‘ object has no attribute ‘numpy‘

不能直接用list.numpy()

但 torch.Tensor 直接转 numpy.ndarray:

'''
inputs[batch] -> 
'''

mat = inputs[batch].numpy()

'''
mat -> 
'''

你可能感兴趣的:(python)