• Returns the imaginary part of a complex (or real) tensor.

    Given a tensor input, this operation returns a tensor of type float that is the imaginary part of each element in input considered as a complex number. If input is real, a tensor of all zeros is returned.

    const x = tf.complex([-2.25, 3.25], [4.75, 5.75]);
    tf.imag(x).print();

    Type Parameters

    Parameters

    Returns T

    Doc

Generated using TypeDoc