I am currently working on a project which uses LSTM to segment time series.
I am treating it as a classification problem so first I convert the labels of segmenting points to labels of classes(1 and 0)
However, I want to also use labels of segmenting points in my loss, so I will need to convert the result of my model back to the original format and then compute loss.
My question is that if I do the conversion on CPU and compute the loss between the result and the label, isn’t that loss not connected to model parameters and thus has no effect?
What is the correct way to implement this? Any help will be greatly appreciated.