I have been trying to train a tensorflow model and have run into an issue that ultimately boils down to being a novice Python programmer. If it were C#, I think I could've figured it out ages ago but Python is still a work in progress.
I have posted on SO ( as well but there have to be some Python/TensorFlow kung fu masters on here.
C# side: 4000 double 1D array sent over GRPC to a served model (using tensorflow serving).
- Model input shape is 100, 40 where 100 is the sample/window size and 40 is an individual feature.
- First Conv2D shape is 100, 40, 1
- Model output is an array of 3 integers using categorical cross entropy
A training sample is the 1D array of 4000 doubles and a single integer which could be any of 3 values. The model is verified working properly so I know tensorflow serving is configured correctly.
1) How do reshape the 4000 element 1D array to the 100, 40 array?
2) How do I remap the single integer label to [1,0,0] for a 1, [0,1,0] for a 0, [0,0,1] for a -1?