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

Method permutation

tensorflow/core/kernels/reduction_ops_common.cc:47–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47gtl::InlinedVector<int32, 8> ReductionHelper::permutation() {
48 const int dims = data_reshape_.size();
49 const int unreduced_dims = (dims + !reduce_first_axis_) / 2;
50 gtl::InlinedVector<int32, 8> perm(dims);
51 for (int i = 0; i < unreduced_dims; i++) {
52 perm[i] = 2 * i + reduce_first_axis_;
53 }
54 for (int i = unreduced_dims; i < dims; i++) {
55 perm[i] = 2 * (i - unreduced_dims) + !reduce_first_axis_;
56 }
57 return perm;
58}
59
60template <typename Tperm>
61Status SimplifyHelper(const Tensor& data, const Tensor& axis,

Callers 15

_random_subsetFunction · 0.45
_compareMethod · 0.45
_compare_cpu_gpuMethod · 0.45
testOutOfOrderMethod · 0.45
testFeedOutOfOrderMethod · 0.45
testGradientsMethod · 0.45
testAgainstNumpyMethod · 0.45
testAgainstNumpyMethod · 0.45
testTop3Method · 0.45
_testLargeSortMethod · 0.45
_testLargeTopKMethod · 0.45
_testMediumTopKMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by 13

_random_subsetFunction · 0.36
_compareMethod · 0.36
_compare_cpu_gpuMethod · 0.36
testOutOfOrderMethod · 0.36
testFeedOutOfOrderMethod · 0.36
testGradientsMethod · 0.36
testAgainstNumpyMethod · 0.36
testAgainstNumpyMethod · 0.36
testTop3Method · 0.36
_testLargeSortMethod · 0.36
_testLargeTopKMethod · 0.36
_testMediumTopKMethod · 0.36