Closed YjyJeff closed 7 years ago
Hi, @YjyJeff
I don't remember why I didn't implement enter_function
and exit_function
... (--;
As you pointed out, it is better to implement them.
Hi, @mokemokechicken OK, I will have a try. Thanks for your code and I learnt a lot from it !
Hi, @YjyJeff Maybe you have implement enter_function and exit_function. Can you tell me how you implement them?
I noticed that in AdditionNPIModel doesn't implement enter_function and exit_function these two methods. Because AdditionNPIModel is derived from NPIStep class, therefore these two methods are pass. According to the paper, every time we enter a function, we should reset the LSTM hidden state and when we return from the function, we should restore the original LSTM state.
Actually, this addition model works perfect even if doesn't implement these two methods. Would it be better(May be less training set or something else) if these two methods are implemented? I noticed that these methods doesn't effect training, so it doesn't have any effect on the model? Why should paper contain these two methods? I know it want to emulate context switch. Does the neural program need context switch to predict next program?
Thanks in advance !