Reuse error
Spider-scnu opened this issue · comments
When I run the 'attentive_neural_process.ipynb', I got the mistakes as follows:
ValueError: Variable layer_3/kernel already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
File "", line 28, in batch_mlp
output, output_sizes[-1], name="layer_{}".format(i + 1))
File "", line 31, in call
hidden = batch_mlp(encoder_input, self._output_sizes, "latent_encoder")
File "", line 58, in call
prior = self._latent_encoder(context_x, context_y)
This may have happened because you haven't reset the TF computation graph.
Try running tf.reset_default_graph()
then re-running the code.