makeTF_Tensor

Creates a tensor from a given scalar.

  1. TF_Tensor* makeTF_Tensor(long[N] dims, SourceRange source)
  2. TF_Tensor* makeTF_Tensor(Slice!(Iterator, N, kind) slice)
  3. TF_Tensor* makeTF_Tensor(T scalar)
    TF_Tensor*
    makeTF_Tensor
    (
    T
    )
    ()
    if (
    isScalarType!T
    )

Examples

auto t = makeTF_Tensor(0);
scope (exit) TF_DeleteTensor(t);
assert(TF_TensorType(t) == TF_INT32);

Meta