mercredi 23 janvier 2019

Globally disable Tensorflow asserts?

Is there an option in Tensorflow that I can set to ignore all the Assert operations I've added to my Graph?

The use case I'm thinking about is adding a bunch of Asserts using tf.contrib.framework.with_shape, and then toggling a flag in my configuration file, config.fast to decide whether I should skip these Asserts during training.

Normally I'd choose whether to generate the Asserts in the first place based on whether config.fast is set, but when using with_shape it seems more convenient to chain this option to my Tensors without looking at my config.fast.

Aucun commentaire:

Enregistrer un commentaire