Home
last modified time | relevance | path

Searched refs:bias_add (Results 1 – 25 of 48) sorted by relevance

12

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dfused_kernel_matcher.cc77 auto bias_add = dyn_cast_or_null<BiasAddOp>(use.getOwner()); in GetBiasAdd() local
79 if (bias_add && bias_add.value() == op) return bias_add; in GetBiasAdd()
101 virtual bool AreFuseCompatible(SrcOpT contraction_op, BiasAddOp bias_add, in AreFuseCompatible() argument
115 BiasAddOp bias_add = GetBiasAdd(contraction.getResult()); in matchAndRewrite() local
116 if (!bias_add) { in matchAndRewrite()
121 if (!AreFuseCompatible(contraction, bias_add, rewriter)) { in matchAndRewrite()
126 SmallVector<Location, 3> locations{contraction.getLoc(), bias_add.getLoc()}; in matchAndRewrite()
128 context, bias_add.getOperation()->getName().stripDialect())}; in matchAndRewrite()
131 auto activation = GetActivation(bias_add); in matchAndRewrite()
135 bool fuse_activation = activation && bias_add.output().hasOneUse(); in matchAndRewrite()
[all …]
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/
Dbiasadd_matmul_test.py67 x5 = nn.bias_add(x5, b)
73 x6 = nn.bias_add(x6, b, data_format="NHWC")
78 x7 = nn.bias_add(x7, b, data_format="NHWC")
83 x8 = nn.bias_add(x8, b, data_format="NHWC")
88 x9 = nn.bias_add(x9, b, data_format="NCHW")
93 x10 = nn.bias_add(x10, b, data_format="NCHW")
98 x11 = nn.bias_add(x11, b, data_format="NCHW")
Ddynamic_input_shapes_test.py44 x = nn.bias_add(x, bias1)
55 x = nn.bias_add(x, bias2)
Dint32_test.py43 x = nn.bias_add(x, b)
Dvgg_block_nchw_test.py56 t = nn.bias_add(conv, b, data_format="NCHW", name="biasAdd")
Dvgg_block_test.py50 t = nn.bias_add(conv, b, name="biasAdd")
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dremapper.cc114 ContractionWithBiasAdd(int contraction, int bias_add) in ContractionWithBiasAdd()
115 : contraction(contraction), bias_add(bias_add) {} in ContractionWithBiasAdd()
118 int bias_add = kMissingIndex; member
124 ContractionWithBiasAddAndActivation(int contraction, int bias_add, in ContractionWithBiasAddAndActivation()
126 : contraction(contraction), bias_add(bias_add), activation(activation) {} in ContractionWithBiasAddAndActivation()
129 int bias_add = kMissingIndex; member
136 ContractionWithSqueezeAndBiasAdd(int contraction, int squeeze, int bias_add) in ContractionWithSqueezeAndBiasAdd()
137 : contraction(contraction), squeeze(squeeze), bias_add(bias_add) {} in ContractionWithSqueezeAndBiasAdd()
141 int bias_add = kMissingIndex; member
178 ContractionWithBiasAddAndAdd(int contraction, int bias_add, int add, in ContractionWithBiasAddAndAdd()
[all …]
Dmkl_remapper_test.cc73 auto bias_add = ops::BiasAdd(s.WithOpName("bias_add"), conv, bias, in FuseConv2DWithBiasAndAddNOrAdd() local
95 std::initializer_list<Input>{input_addn, bias_add}); in FuseConv2DWithBiasAndAddNOrAdd()
98 auto add = ops::AddV2(s.WithOpName(add_op), input_addn, bias_add); in FuseConv2DWithBiasAndAddNOrAdd()
101 auto add = ops::Add(s.WithOpName(add_op), input_addn, bias_add); in FuseConv2DWithBiasAndAddNOrAdd()
237 auto bias_add = ops::BiasAdd(s.WithOpName("bias_add"), conv, bias); \
244 return ops::Identity(fetch, ops::Relu(activate, bias_add)); \
246 return ops::Identity(fetch, ops::Relu6(activate, bias_add)); \
248 return ops::Identity(fetch, ops::Elu(activate, bias_add)); \
252 return ops::Identity(fetch, bias_add); \
467 auto bias_add = ops::BiasAdd(s.WithOpName("bias_add"), matmul, bias); in TEST_F() local
[all …]
Dremapper_test.cc346 auto bias_add = ops::BiasAdd(s.WithOpName("bias_add"), conv, bias); in TEST_F() local
347 auto fetch = ops::Identity(s.WithOpName("fetch"), bias_add); in TEST_F()
410 auto bias_add = ops::BiasAdd(s.WithOpName("bias_add"), matmul, bias); in RunTest() local
411 auto fetch = ops::Identity(s.WithOpName("fetch"), bias_add); in RunTest()
489 auto bias_add = ops::BiasAdd(s.WithOpName("bias_add"), conv, bias); in TEST_F() local
494 return ops::Identity(fetch, ops::Relu(activate, bias_add)); in TEST_F()
563 auto bias_add = ops::BiasAdd(s.WithOpName("bias_add"), conv, bias); in TEST_F() local
570 return ops::Identity(fetch, ops::Relu(activate, bias_add)); in TEST_F()
572 return ops::Identity(fetch, ops::Relu6(activate, bias_add)); in TEST_F()
574 return ops::Identity(fetch, ops::Elu(activate, bias_add)); in TEST_F()
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dbias_op_base.py56 tf_val = self.evaluate(nn_ops.bias_add(np_inputs, np_bias))
85 nn_ops.bias_add(np_inputs, np_bias, data_format="NCHW"))
104 nn_ops.bias_add([1, 2], [1])
108 nn_ops.bias_add(
114 nn_ops.bias_add(
160 def bias_add(input_tensor, bias_tensor): function
161 return nn_ops.bias_add(
169 return bias_add(input_tensor, bias_tensor)
172 return bias_add(input_tensor, bias_tensor)
183 bias_add_output = bias_add(input_tensor, bias_tensor)
[all …]
Dbias_op_deterministic_test.py107 bias_add_output = nn_ops.bias_add(
120 bias_add_output = nn_ops.bias_add(
Dconv_ops_test.py3306 bias_add = nn_ops.bias_add(conv, bias_in)
3307 add = math_ops.add_n([bias_add, conv2])
3337 bias_add = nn_ops.bias_add(conv, bias_in)
3338 add = math_ops.add_n([bias_add, conv1])
3366 bias_add = nn_ops.bias_add(conv, bias_in)
3367 add = math_ops.add_n([bias_add, conv2])
3398 bias_add = nn_ops.bias_add(conv, bias_in)
3399 add = math_ops.add_n([bias_add, conv2])
3429 bias_add = nn_ops.bias_add(conv, bias_in)
3430 add = math_ops.add_n([bias_add, conv1])
/external/tensorflow/tensorflow/lite/experimental/examples/lstm/
Drnn_cell.py143 gate_inputs = nn_ops.bias_add(gate_inputs, self._bias)
463 i = nn_ops.bias_add(
469 f = nn_ops.bias_add(
475 o = nn_ops.bias_add(
481 j = nn_ops.bias_add(
/external/tensorflow/tensorflow/core/grappler/utils/
Dpattern_utils_test.cc43 auto bias_add = ops::BiasAdd(s.WithOpName("bias_add"), matmul, bias); in GetMatMulBiasAddGeluGraph() local
46 ops::Identity(s.WithOpName("external_dependent"), bias_add); in GetMatMulBiasAddGeluGraph()
52 bias_add, one_over_square_root_two); in GetMatMulBiasAddGeluGraph()
60 ops::Mul(s.WithOpName("gelu"), one_half_times_erf_plus_one, bias_add); in GetMatMulBiasAddGeluGraph()
/external/tensorflow/tensorflow/python/keras/applications/
Dimagenet_utils.py287 x = backend.bias_add(
290 x = backend.bias_add(x, mean_tensor, data_format)
/external/tensorflow/tensorflow/python/keras/layers/ops/
Dcore.py64 outputs = nn_ops.bias_add(outputs, bias)
/external/tensorflow/tensorflow/lite/g3doc/guide/
Dops_compatibility.md42 (`tf.placeholder`), or fused into more complex operations (`tf.nn.bias_add`).
74 * `tf.nn.bias_add`
/external/tensorflow/tensorflow/python/keras/layers/
Drecurrent.py1385 h = K.bias_add(h, self.bias)
1858 x_z = K.bias_add(x_z, input_bias[:self.units])
1859 x_r = K.bias_add(x_r, input_bias[self.units: self.units * 2])
1860 x_h = K.bias_add(x_h, input_bias[self.units * 2:])
1875 recurrent_z = K.bias_add(recurrent_z, recurrent_bias[:self.units])
1876 recurrent_r = K.bias_add(recurrent_r,
1886 recurrent_h = K.bias_add(recurrent_h, recurrent_bias[self.units * 2:])
1901 matrix_x = K.bias_add(matrix_x, input_bias)
1909 matrix_inner = K.bias_add(matrix_inner, recurrent_bias)
2446 x_i = K.bias_add(x_i, b_i)
[all …]
Dconvolutional.py264 return nn.bias_add(o, self.bias, data_format=self._tf_data_format)
269 outputs = nn.bias_add(
1039 outputs = nn.bias_add(
1331 outputs = nn.bias_add(
1639 outputs = nn.bias_add(
2072 outputs = nn.bias_add(
2247 outputs = nn.bias_add(
2426 outputs = backend.bias_add(
Dkernelized.py226 outputs = nn.bias_add(outputs, self.bias)
Dlocal.py283 output = K.bias_add(output, self.bias, data_format=self.data_format)
593 output = K.bias_add(output, self.bias, data_format=self.data_format)
/external/tensorflow/tensorflow/python/grappler/
Dauto_mixed_precision_test.py134 h_conv1 = nn.relu(nn.bias_add(_conv2d(x_image, w_conv1), b_conv1))
138 h_conv2 = nn.relu(nn.bias_add(_conv2d(h_pool1, w_conv2), b_conv2))
178 i = math_ops.sigmoid(nn.bias_add(i, bias))
179 f = math_ops.sigmoid(nn.bias_add(f, bias))
180 o = math_ops.sigmoid(nn.bias_add(o, bias))
181 c = math_ops.tanh(nn.bias_add(c, bias))
/external/tensorflow/tensorflow/lite/testing/op_tests/
Dtranspose_conv.py171 out = tf.nn.bias_add(
/external/tensorflow/tensorflow/python/keras/layers/legacy_rnn/
Drnn_cell_impl.py480 gate_inputs = nn_ops.bias_add(gate_inputs, self._bias)
603 gate_inputs = nn_ops.bias_add(gate_inputs, self._gate_bias)
612 candidate = nn_ops.bias_add(candidate, self._candidate_bias)
789 gate_inputs = nn_ops.bias_add(gate_inputs, self._bias)
1054 lstm_matrix = nn_ops.bias_add(lstm_matrix, self._bias)
/external/tensorflow/tensorflow/core/common_runtime/
Dmkl_layout_pass.cc250 csinfo_.bias_add = "BiasAdd"; in MklLayoutRewritePass()
707 minfo_.push_back({csinfo_.conv2d, csinfo_.bias_add, in MklLayoutRewritePass()
911 string bias_add; member
1134 if (m->type_string() == csinfo_.bias_add) { in GetConv2DOrBiasAdd()
1143 e->dst()->type_string() == csinfo_.bias_add && in GetConv2DOrBiasAdd()
2971 CHECK_EQ(((m->type_string() == csinfo_.bias_add && in MergeConv2DWithBiasAdd()
2973 ((n->type_string() == csinfo_.bias_add && in MergeConv2DWithBiasAdd()
2979 Node* pred = m->type_string() == csinfo_.bias_add ? n : m; in MergeConv2DWithBiasAdd()
2980 Node* succ = m->type_string() == csinfo_.bias_add ? m : n; in MergeConv2DWithBiasAdd()
3448 if (((m->type_string() == csinfo_.bias_add && in MergeNode()
[all …]

12