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

Function BiasAdd

tensorflow/core/kernels/cwise_ops_test.cc:212–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210
211template <class T>
212Graph* BiasAdd(int rows, int cols, DataType type) {
213 Graph* g = new Graph(OpRegistry::Global());
214 Tensor lhs(type, TensorShape({rows, cols}));
215 lhs.template flat<T>().setRandom();
216 TensorShape rhs_shape;
217 rhs_shape = TensorShape({cols});
218 Tensor rhs(type, rhs_shape);
219 rhs.template flat<T>().setRandom();
220 test::graph::Binary(g, "BiasAdd", test::graph::Constant(g, lhs),
221 test::graph::Constant(g, rhs));
222 return g;
223}
224
225#define BM_BIAS_ADD(DEVICE, C_TYPE, TF_TYPE, R, C) \
226 void BM_##DEVICE##_##C_TYPE##_BiasAdd_R##R##_C##C(int iters, int arg) { \

Calls 3

ConstantFunction · 0.70
TensorShapeClass · 0.50
BinaryFunction · 0.50

Tested by

no test coverage detected