-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Q]Error when applying TSR on MTS #47
Comments
Hi @Ricky-zhang9678, For me it seem like your model output shape does not return a softmax. Just for my understanding your input has the shape (1,feat, timestep)? |
Yes, you are right. My model output shape does not return a softmax. I used sigmoid as the activation function in the last layer cause I am doing binary classification. Maybe that's the reason for error. |
Hi @Ricky-zhang9678, Unfortunately, TSR (as most algorithms included in this library) does currently not work with the sigmoid activation function for binary classification. TSR largely relies on tf-explain that needs a class index for gradient calculations (see the Issue here). To make it TSR work with sigmoid function there might be the possibility of writing a wrapper for the model that parses one sigmoid neuron into a softmax layer with two neurons. However, I am not sure about the side effects (and would need time to think about it). Therefore, I would advise you to use two output neurons, either with softmax or sigmoid. |
Thanks for your reply and help! I've attempted to change my model output to softmax, and TSInterpret has successfully executed. Here, you can find visualizations for features 0, 1, and 2. I'm still encountering an issue concerning the white line on the map. Could you please clarify what it signifies when it's flat and when it exhibits an upward or downward trend? |
hm interesting, so the white line is suppose to be the original time series. If your original time series is incorrect: There was a bug in the plot function of an older version of TSInterpret (<= 0.3.4), so maybe you would need to update your library version (>=0.4.0). |
Thanks! I am going to close the issue. Very thanks for your attention! |
Hello again! Thanks for your attention!
I'm encountering some errors during the execution of TSR. I think I have made input data in the correct data type and shape. However, the code isn't running successfully. Here is the code and the error message:
Do you have any insights into what might be causing this issue? Any suggestions on how to resolve it would be greatly appreciated. Thank you in advance!
The text was updated successfully, but these errors were encountered: