MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / shuffled_shape

Method shuffled_shape

tensorflow/core/kernels/reduction_ops_common.cc:35–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35TensorShape ReductionHelper::shuffled_shape() {
36 const int dims = data_reshape_.size();
37 TensorShape shape;
38 for (int i = reduce_first_axis_; i < dims; i += 2) {
39 shape.AddDim(data_reshape_[i]);
40 }
41 for (int i = !reduce_first_axis_; i < dims; i += 2) {
42 shape.AddDim(data_reshape_[i]);
43 }
44 return shape;
45}
46
47gtl::InlinedVector<int32, 8> ReductionHelper::permutation() {
48 const int dims = data_reshape_.size();

Callers 1

ComputeMethod · 0.80

Calls 2

sizeMethod · 0.45
AddDimMethod · 0.45

Tested by

no test coverage detected