def net_func(): x = layers.fill_constant(shape=[2, 3], dtype='float32', value=2.0) condition = layers.reduce_max(x) < 1.0 layers.Assert(condition, [x], 10, name="test")
def net_func(): x = layers.fill_constant(shape=[10], dtype='float32', value=2.0) condition = layers.reduce_max(x) < 1.0 layers.Assert(condition, (x, ), 5)
def net_func(): condition = layers.fill_constant(shape=[1, 2], dtype='bool', value=True) layers.Assert(condition, [])
def net_func(): zero = layers.fill_constant(shape=[1], dtype='int64', value=0) one = layers.fill_constant(shape=[1], dtype='int64', value=1) condition = layers.less_than(one, zero) # False layers.Assert(condition, [zero, one])
def net_func(): condition = layers.fill_constant(shape=[1], dtype='bool', value=False) layers.Assert(condition)