MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / any

Function any

tensorflow/python/keras/backend.py:2007–2019  ·  view source on GitHub ↗

Bitwise reduction (logical OR). Arguments: x: Tensor or variable. axis: axis along which to perform the reduction. keepdims: whether the drop or broadcast the reduction axes. Returns: A uint8 tensor (0s and 1s).

(x, axis=None, keepdims=False)

Source from the content-addressed store, hash-verified

2005
2006@keras_export('keras.backend.any')
2007def any(x, axis=None, keepdims=False):
2008 """Bitwise reduction (logical OR).
2009
2010 Arguments:
2011 x: Tensor or variable.
2012 axis: axis along which to perform the reduction.
2013 keepdims: whether the drop or broadcast the reduction axes.
2014
2015 Returns:
2016 A uint8 tensor (0s and 1s).
2017 """
2018 x = math_ops.cast(x, dtypes_module.bool)
2019 return math_ops.reduce_any(x, axis, keepdims)
2020
2021
2022@keras_export('keras.backend.all')

Callers 15

_traverse_internalFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
visitFunction · 0.85
filter_variablesFunction · 0.85
aggregateMethod · 0.85
streaming_concatFunction · 0.85

Calls 1

castMethod · 0.45

Tested by 15

mainFunction · 0.68
_TestActivationBitsMethod · 0.68
_TestEvalQuantizationMethod · 0.68
_TestIdentityNodeMethod · 0.68
_TestRewriteWithScopeMethod · 0.68
_nested_codepointsFunction · 0.68