Split


tensorflow C++ API

tensorflow::ops::Split

Splits a tensor into num_split tensors along one dimension.


Summary

Arguments:

  • scope: A Scope object
  • axis: 0-D. The dimension along which to split. Must be in the range [-rank(value), rank(value)).
  • value: The tensor to split.
  • num_split: The number of ways to split. Must evenly divide value.shape[split_dim].

Returns:

  • OutputList: They are identically shaped tensors, whose shape matches that of value except along axis, where their sizes are values.shape[split_dim] / num_split.

Split block

Source link :https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_array_ops.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • Input axis: 0-D. The dimension along which to split. Must be in the range [-rank(value), rank(value)).
  • Input value: The tensor to split.
  • Int64 num_split: The number of ways to split. Must evenly divide value.shape[split_dim].

Output:

  • OutputList output: Output object of Split class object.

Result:

  • std::vector(Tensor) result_output: The output tensor.

Using Method

※ axis의 값에 해당하는 차원을 num_split의 값만큼 나눈다. 즉 num_split은 해당하는 차원의 값의 갯수를 나눠서 0으로 떨어지는 값만 넣을 수 있다. (ex: 해당하는 차원의 값의 갯수가 6개 일 때 num_split에 올수 있는 수는 1, 2, 3, 6 이다.)

results matching ""

    No results matching ""