f3dasm icon indicating copy to clipboard operation
f3dasm copied to clipboard

Fix conversion to torch tensor

Open manuGil opened this issue 3 years ago • 0 comments

When passing non-numeric values to the DATA class, the method torch_sensor() produces the following error:

return torch.tensor(self.values).float()

TypeError: can't convert np.ndarray of type numpy.object_. 
The only supported types are: float64, float32, float16, complex64, 
complex128, int64, int32, int16, int8, uint8, and bool.

We need a fix for this. For now, we remove the line of code that triggers the error.

manuGil avatar Nov 17 '21 04:11 manuGil