IndexError: tuple index out of range
Hi,I have a question there, so I hope to get some help. I use a dateset about MOOC, and I use a LSTM model. I want to predict whether students will drop out of school in the next week based on the data of the previous few weeks. Then I want to use DICE to generate some counterfactual examples for drop-out students. But I get a problem, I don’t know how to solve it. What does 'self.num_output_nodes' mean? Could you give me some help? Thank you.
Traceback (most recent call last):
File "E:/DJL/my-experiment/cnnlstm_torch/mycode/my_lstm/my_lstm.py", line 189, in
@djlwzw, the num_output_nodes is internal to DiCE nd represent the number of classes in a classification problem.
Whis version of dice-ml are you using in your environment?
Regards,
Thank you for your reply, I am using the latest dice-ml release 0.6.1.
@djlwzw have you tried the getting-started example with pytorch in this notebook?
Does this simple example work? It will also help if you can share a minimum working example that produces this error. My guess is that the LSTM output may be of a different dimension than the classification models.
I tried that simple example, and it ran successfully. Your guess is correct. The output of my model is inconsistent with the classification dimension. Then I found the reason and I have succeeded. Thank you for your help.
@djlwzw could you close this issue if you are unblocked?
Regards,