Skip to content

ones(*shape, *, optimizable=False, dtype=None) ΒΆ

Source code in funfact/lang/_special.py
def ones(*shape, optimizable=False, dtype=None):
    return TsrEx(
        P.tensor(
            AbstractTensor(
                *flatten(shape), symbol=('1', None),
                initializer=ini.Ones(dtype=dtype), optimizable=optimizable
            )
        )
    )
Back to top