Closed akgopan closed 4 years ago
Hello, thank you for using this package and bringing this issue to my attention. The error message was the result of a few errant @tf.function decorators in the layer object, which have since been removed. If you try to run the Google Colab again with the most recent version of TensorBNN it should work. If you have any other issues please let us know.
Also, just so you are aware, when you actually get the code to run the percent error on the training data will be Inf on account of some of the y-values be 0. This is to be expected, but you can avoid the issue by using 31 training points instead, using the following code to generate your training data.
trainIn=np.linspace(-2,2,num=31)
valIn=np.linspace(-2+2/30,2.0-2/30,num=30)
trainOut = np.sin(trainIn*math.pi*2)*trainIn-np.cos(trainIn*math.pi)
valOut = np.sin(valIn*math.pi*2)*valIn-np.cos(valIn*math.pi)
When running the regression example, I get the following error:
On searching about this error, it seems that this is due to how the states are being assigned ([https://github.com/tensorflow/tensorflow/issues/32889]).
Please advise if this is something that can be easily fixed?
I am running it in Google Colabs, with GPU. I am using tensorflow 2.3.0 Ipython code attached. TensorBNN_example.zip