assert_deps

tfsnippet.utils.assert_deps(*args, **kwds)

If tfsnippet.settings.enable_assertions == True, open a context that will run assert_ops. Otherwise do nothing.

Parameters:

assert_ops (Iterable[tf.Operation or None]) – A list of assertion operations. None items will be ignored.

Yields:

bool

A boolean indicate whether or not the assertion operations

are not empty, and are executed.