makeTF_Tensor

Creates a tensor from a given mir.ndslice.Slice

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

Examples

import mir.ndslice : iota, universal;

const slice = iota(2, 3);
auto tensor = slice.makeTF_Tensor;
scope (exit) TF_DeleteTensor(tensor);

Meta