agents icon indicating copy to clipboard operation
agents copied to clipboard

Error when saving model with PolicySaver

Open enriquegit opened this issue 3 years ago • 3 comments

The error happens when trying to save a model with tensorflow-agents. For example:

collect_policy = tf_agent.collect_policy
saver = PolicySaver(collect_policy, batch_size=None)

and saving the model with:

saver.save('models/ddpg/')

This works ok in google colab but the following error (see image below) is shown when running on a local windows PC.

library versions: tensorflow 2.9.1 tf-agents 0.11.0

question

enriquegit avatar Jun 08 '22 09:06 enriquegit

Can you try updating using pip install tf_agents[reverb]?

sguada avatar Jun 08 '22 16:06 sguada

@sguada I tried your suggested solution. Now, the following error is shown:

ImportError: cannot import name 'network' from 'tensorflow.python.keras.engine'

enriquegit avatar Jun 09 '22 09:06 enriquegit

Probably due to mismatch version of TF.

sguada avatar Jun 18 '22 00:06 sguada