Splits a tensor into `num_split` tensors along one dimension. Arguments: 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
(scope *Scope, axis tf.Output, value tf.Output, num_split int64)
| 3169 | // except along `axis`, where their sizes are |
| 3170 | // `values.shape[split_dim] / num_split`. |
| 3171 | func Split(scope *Scope, axis tf.Output, value tf.Output, num_split int64) (output []tf.Output) { |
| 3172 | if scope.Err() != nil { |
| 3173 | return |
| 3174 | } |
| 3175 | attrs := map[string]interface{}{"num_split": num_split} |
| 3176 | opspec := tf.OpSpec{ |
| 3177 | Type: "Split", |
| 3178 | Input: []tf.Input{ |
| 3179 | axis, value, |
| 3180 | }, |
| 3181 | Attrs: attrs, |
| 3182 | } |
| 3183 | op := scope.AddOperation(opspec) |
| 3184 | if scope.Err() != nil { |
| 3185 | return |
| 3186 | } |
| 3187 | var idx int |
| 3188 | var err error |
| 3189 | if output, idx, err = makeOutputList(op, idx, "output"); err != nil { |
| 3190 | scope.UpdateErr("Split", err) |
| 3191 | return |
| 3192 | } |
| 3193 | return output |
| 3194 | } |
| 3195 | |
| 3196 | // Computes offsets of concat inputs within its output. |
| 3197 | // |