0

I have define a function say funA(x) in my python script. This function runs a neural network based on theano. If I call it one time the code runs well. However, if I try to call it several times with different inputs in the loop, for example: for i in range(4): funA(x[i]) when i=0, the code runs well, but when it runs to i=1, the code raise an error: ValueError: Cannot compute test value: input 0 (x) of Op dot(x, W) missing default value.

I have installed pymc3 and try to set theano.config.compute_test_value back to 'ignore' as in the following link, but failed PyMC3 & Theano - Theano code that works stop working after pymc3 import

Another link as in below says, I can try to remove the .theano directory, but I am using windows version of theano, where can I find the .theano directory? https://github.com/Theano/Theano/issues/1439

Thank you in advance

hadesmajesty
  • 51
  • 2
  • 6

1 Answers1

0

Good news: The next release of pymc3 will no longer change any theano settings on its own, so that source of bugs will hopefully be a thing of the past.

To clean your theano cache, you can use theano-cache purge

aseyboldt
  • 1,090
  • 8
  • 14
  • Great to hear, @aseyboldt, but just wondering if this has been patched in the master branch of PyMC3 already? – ericmjl Aug 02 '17 at 03:28