Mani Sarkar
Mani Sarkar

Reputation: 115

Error processing Timeseries tensorflow notebook on TPU

Here's a Timeseries notebook I used from the good work by Magnus Erik Hvass Pedersen - thanks for that:

https://colab.research.google.com/drive/1F6CuGVWN5TNgIjqxdu5glFeGBEr71TgO

I have had success running a version of this notebook via Google Colab on a GPU but when I do the same (after some modifications to make the code compatible on TPUs) I get this error:

ValueError: Error when checking input: expected input to have shape (299776, 20) but got array with shape (33309, 20)

The full stack trace can be found on the cell location https://colab.research.google.com/drive/1F6CuGVWN5TNgIjqxdu5glFeGBEr71TgO#scrollTo=wdSmXdvDw5HL.

It has been a bit of a tug-of-war to get the input/output data shapes in order but as we kept solving I/O shape issues other shape related issues started proping up.

The notebook is available for sharing and commenting.

Any thoughts will be appreciated.

Upvotes: 0

Views: 246

Answers (1)

aman2930
aman2930

Reputation: 275

To solve the error ValueError: Operation 'tpu_140099307695464/VarIsInitializedOp'. Try using tf.train.RMSPropOptimizer instead of using RMSProp from tensorflow.keras.optimizers.

Upvotes: 2

Related Questions