You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a NN pre-trained in Pytorch. I would like to load it using gotch, evaluate the performance and re-train it with new data.
The data is a float slice with length of 10, the result is binary classification (0/1).
I have no problems to load the NN and evaluate the performance, looping the slices of data:
test_data := ts.MustOfSlice(line, ts.WithDType(gotch.Float))
result := m.ForwardT(test_data, false)
where line is []float32 slice with length of [10].
Now I would like to prepare a 2D tensor to use in train routine, so I call ts.MustOfSlice with the whole dataset:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a NN pre-trained in Pytorch. I would like to load it using gotch, evaluate the performance and re-train it with new data.
The data is a float slice with length of 10, the result is binary classification (0/1).
I have no problems to load the NN and evaluate the performance, looping the slices of data:
where
line
is []float32 slice with length of [10].Now I would like to prepare a 2D tensor to use in train routine, so I call
ts.MustOfSlice
with the whole dataset:train_data := ts.MustOfSlice(train_records, ts.WithDType(gotch.Float))
where train_records is [][]float32 with length of [250][10]
This call is failed:
GoKind2DType() failed: no corresponding DType to given Go reflect.Kind slice
Reading the code of
ts.OfSlice
, it seems that it wants 1D slice as input, but cannot work with 2D slices.I cannot find any example using the 'brut' slices for training.
Please, explain how can I train such network with my data using gotch.
Beta Was this translation helpful? Give feedback.
All reactions