rnrover
rnrover

Reputation: 15

tf.contrib.learn.RunConfig(save_checkpoints_secs=1)) throws unexpected keyword TypeError

As per the instructions at https://www.tensorflow.org/versions/r0.10/tutorials/monitors/index.html I have added a monitor to the training script as such:

tf.contrib.learn.DNNClassifier(model_dir=model_dir,
                                   feature_columns=deep_columns,
                                   hidden_units=[50, 100, 50],
                                   config=tf.contrib.learn.RunConfig(
                                            save_checkpoints_secs=1))

However, this throws the following TypeError:

TypeError: init() got an unexpected keyword argument 'save_checkpoints_secs'

There are additional lines of code included related to the logging and monitoring, however they seem irrelevant to this problem...maybe...maybe not...

Upvotes: 0

Views: 360

Answers (1)

Moses Koledoye
Moses Koledoye

Reputation: 78564

Apparently, you're running a version of tensorflow that is < 0.10. Versions below 0.10 do not take a save_checkpoints_secs keyword for RunConfig initialization.

You should upgrade your tensorflow installation:

How to Update Tensorflow from source

Download and Setup

Upvotes: 1

Related Questions