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

Function RowReduce

tensorflow/core/kernels/reduction_ops_test.cc:50–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50static Graph* RowReduce(const string& reduce, int num_x, int num_y) {
51 auto* g = new Graph(OpRegistry::Global());
52 Tensor data(DT_FLOAT, TensorShape({num_x, num_y}));
53 data.flat<float>().setRandom();
54 Tensor axes(DT_INT32, TensorShape({1}));
55 axes.flat<int32>()(0) = 1;
56 test::graph::Reduce(g, reduce, test::graph::Constant(g, data),
57 test::graph::Constant(g, axes));
58 return g;
59}
60
61static Graph* ThreeDYReduce(const string& reduce, int num_y, int num_z) {
62 auto* g = new Graph(OpRegistry::Global());

Callers 1

DoRowReduceFunction · 0.85

Calls 3

ConstantFunction · 0.70
TensorShapeClass · 0.50
ReduceFunction · 0.50

Tested by

no test coverage detected