Пример #1
0
def _squeeze(children, attrs, odtype='float32'):
    axis = None
    try:
        axis = [attrs.get_int('axis', None)]
    except ValueError:
        axis = axis or attrs.get_int_tuple('axis', None)

    return op.squeeze(children[0], axis)
Пример #2
0
def _tvm_squeeze(inp, dim, name):
    return _op.squeeze(inp, axis=[dim])
Пример #3
0
def _squeeze(children, attrs, odtype='float32'):
    axis = attrs.get_int_tuple('axis', None)
    axis = [axis] if isinstance(axis, int) else axis

    return op.squeeze(children[0], axis)