MCPcopy Create free account
hub / github.com/dengdan/seglink / _assert

Function _assert

preprocessing/tf_image.py:41–59  ·  view source on GitHub ↗

A polymorphic assert, works with tensors and boolean expressions. If `cond` is not a tensor, behave like an ordinary assert statement, except that a empty list is returned. If `cond` is a tensor, return a list containing a single TensorFlow assert op. Args: cond: Something eval

(cond, ex_type, msg)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls 1

_is_tensorFunction · 0.85

Tested by

no test coverage detected