in Tutorial-4, for some reason in the notebook, you transformed the target values from integer to string as:
df['Outcome'] = np.where(df['Outcome']==1, "Diabetic", "No Diabetic")
When in the next steps, you tried:
y_train=torch.LongTensor(y_train)
there is the following problem:
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._
Also the other issue open now, it is the same problem: #1
If i comment the row df['Outcome'] = np.where(df['Outcome']==1, "Diabetic", "No Diabetic"), everything works correctly.
Best,
Luca
in Tutorial-4, for some reason in the notebook, you transformed the target values from integer to string as:
df['Outcome'] = np.where(df['Outcome']==1, "Diabetic", "No Diabetic")When in the next steps, you tried:
y_train=torch.LongTensor(y_train)there is the following problem:
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._
Also the other issue open now, it is the same problem: #1
If i comment the row
df['Outcome'] = np.where(df['Outcome']==1, "Diabetic", "No Diabetic"), everything works correctly.Best,
Luca