Home
last modified time | relevance | path

Searched refs:filter_shape (Results 1 – 25 of 67) sorted by relevance

123

/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dconv_op_helpers.cc96 xla::XlaOp CreateExpandedFilterMask(const xla::Shape& filter_shape, in CreateExpandedFilterMask() argument
99 ExpandedFilterShapeForDepthwiseConvolution(filter_shape); in CreateExpandedFilterMask()
101 filter_shape.dimensions(filter_shape.dimensions_size() - 1); in CreateExpandedFilterMask()
128 xla::XlaOp ReshapeFilterForDepthwiseConvolution(const xla::Shape& filter_shape, in ReshapeFilterForDepthwiseConvolution() argument
130 int64 input_feature_dim = filter_shape.dimensions_size() - 2; in ReshapeFilterForDepthwiseConvolution()
131 int64 output_feature_dim = filter_shape.dimensions_size() - 1; in ReshapeFilterForDepthwiseConvolution()
132 int64 depthwise_multiplier = filter_shape.dimensions(output_feature_dim); in ReshapeFilterForDepthwiseConvolution()
133 int64 input_feature = filter_shape.dimensions(input_feature_dim); in ReshapeFilterForDepthwiseConvolution()
136 xla::Shape implicit_broadcast_filter_shape = filter_shape; in ReshapeFilterForDepthwiseConvolution()
146 xla::XlaOp ContractFilterForDepthwiseBackprop(const xla::Shape& filter_shape, in ContractFilterForDepthwiseBackprop() argument
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dmkl_conv_ops.h187 const TensorShape& filter_shape, in GetFilterSizeInMklOrder() argument
192 OP_REQUIRES(context_, filter_shape.dims() == strides_.size(), in GetFilterSizeInMklOrder()
196 filter_shape.DebugString())); in GetFilterSizeInMklOrder()
200 FastBoundsCheck(filter_shape.dim_size(i), in GetFilterSizeInMklOrder()
208 OP_REQUIRES(context_, input_depth == filter_shape.dim_size(2), in GetFilterSizeInMklOrder()
211 input_depth, " vs ", filter_shape.dim_size(2))); in GetFilterSizeInMklOrder()
215 static_cast<int>(filter_shape.dim_size(TF_2DFILTER_DIM_H)); in GetFilterSizeInMklOrder()
217 static_cast<int>(filter_shape.dim_size(TF_2DFILTER_DIM_W)); in GetFilterSizeInMklOrder()
219 static_cast<int>(filter_shape.dim_size(TF_2DFILTER_DIM_I)); in GetFilterSizeInMklOrder()
221 static_cast<int>(filter_shape.dim_size(TF_2DFILTER_DIM_O)); in GetFilterSizeInMklOrder()
[all …]
Dconv_grad_ops.cc59 const TensorShape& filter_shape, const TensorShape& output_shape, in ConvBackpropExtractAndVerifyDimension() argument
64 dim->filter_size = filter_shape.dim_size(filter_spatial_dim); in ConvBackpropExtractAndVerifyDimension()
100 const TensorShape& filter_shape, const TensorShape& out_backprop_shape, in ConvBackpropComputeDimensionsV2() argument
110 if (filter_shape.dims() != num_dims) { in ConvBackpropComputeDimensionsV2()
133 << filter_shape.dim_size(num_dims - 2); in ConvBackpropComputeDimensionsV2()
134 if (dims->in_depth % filter_shape.dim_size(num_dims - 2)) { in ConvBackpropComputeDimensionsV2()
138 dims->out_depth = filter_shape.dim_size(num_dims - 1); in ConvBackpropComputeDimensionsV2()
152 label, input_shape, filter_shape, out_backprop_shape, dilations, in ConvBackpropComputeDimensionsV2()
161 const TensorShape& filter_shape, in ConvBackpropComputeDimensions() argument
168 label, num_spatial_dims, input_shape, filter_shape, out_backprop_shape, in ConvBackpropComputeDimensions()
Dconv_grad_filter_ops.cc245 TensorShape filter_shape; in Compute() local
247 filter_sizes.vec<int32>(), &filter_shape)); in Compute()
253 input.shape(), filter_shape, out_backprop.shape(), in Compute()
258 context->allocate_output(0, filter_shape, &filter_backprop)); in Compute()
261 if (filter_shape.num_elements() == 0) { in Compute()
498 TensorShape filter_shape; in Compute() local
500 filter_sizes.vec<int32>(), &filter_shape)); in Compute()
504 context->allocate_output(0, filter_shape, &filter_backprop)); in Compute()
507 if (filter_shape.num_elements() == 0) { in Compute()
560 TensorShape filter_shape = filter_backprop->shape(); in operator ()() local
[all …]
/external/tensorflow/tensorflow/compiler/xla/tests/
Dconvolution_test.cc118 Shape filter_shape = ShapeUtil::MakeShapeWithType<T>({1, 1, 1, 2}); in RunTest() local
120 auto filter = Parameter(&builder, 1, filter_shape, "filter"); in RunTest()
149 Shape filter_shape = ShapeUtil::MakeShapeWithType<T>({1, 1, 2, 2}); in RunTest() local
151 auto filter = Parameter(&builder, 1, filter_shape, "filter"); in RunTest()
183 Shape filter_shape = ShapeUtil::MakeShapeWithType<T>({1, 1, 2, 2}); in RunTest() local
185 auto filter = Parameter(&builder, 1, filter_shape, "filter"); in RunTest()
219 Shape filter_shape = ShapeUtil::MakeShapeWithType<T>({1, 1, 3, 3}); in RunTest() local
221 auto filter = Parameter(&builder, 1, filter_shape, "filter"); in RunTest()
247 Shape filter_shape = ShapeUtil::MakeShape(F32, {1, 2, 2}); in XLA_TEST_F() local
249 auto filter = Parameter(&builder, 1, filter_shape, "filter"); in XLA_TEST_F()
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dcudnn_determinism_test.py55 def _random_out_op(self, in_shape, filter_shape): argument
59 filter_op = self._random_data_op(filter_shape)
77 filter_shape = FilterShape(height=3, width=3, in_channels=8, out_channels=8)
79 out_op = self._random_out_op(in_shape, filter_shape)
81 in_op, filter_shape, out_op, strides=_STRIDES, padding=_PADDING)
88 filter_shape = FilterShape(
90 filter_op = self._random_data_op(filter_shape)
91 out_op = self._random_out_op(in_shape, filter_shape)
Dconv2d_backprop_filter_grad_test.py44 filter_shape = [3, 3, 4, 6]
49 array_ops.zeros(filter_shape),
58 filter_shape,
64 output, filter_shape)
78 filter_shape = [3, 3, 4, 6]
83 array_ops.zeros(filter_shape),
93 filter_shape,
100 output, filter_shape)
Dconv_ops_3d_test.py368 self, batch, input_shape, filter_shape, in_depth, out_depth, stride, argument
372 filter_planes, filter_rows, filter_cols = filter_shape
375 filter_shape = [
400 for x in filter_shape:
420 filter_data, shape=filter_shape, dtype=data_type, name="filter")
447 filter_tensor, filter_shape, conv, output_shape)
470 filter_shape=(3, 3, 3),
482 filter_shape=(2, 2, 2),
494 filter_shape=(3, 3, 3),
506 filter_shape=(2, 2, 2),
[all …]
Dconv3d_backprop_filter_v2_grad_test.py44 filter_shape = [3, 3, 3, 2, 3]
49 array_ops.zeros(filter_shape), strides,
55 output = nn_ops.conv3d_backprop_filter_v2(in_val, filter_shape,
60 output, filter_shape)
Datrous_convolution_test.py98 def _test_atrous_convolution(self, add_check, input_shape, filter_shape, argument
101 np.prod(filter_shape), dtype=np.float32).reshape(filter_shape)
139 filter_shape=[kernel_height, kernel_width, 2, 2],
156 filter_shape=[
173 filter_shape=[kernel_width, 2, 2],
189 filter_shape=[3, 2, 2],
197 filter_shape=[3, 3, 2, 2],
/external/tensorflow/tensorflow/contrib/fused_conv/python/ops/
Dfused_conv2d_bias_activation_benchmark.py32 def build_conv_bias_relu_graph(device, input_shape, filter_shape, strides, argument
57 filt = variables.Variable(random_ops.truncated_normal(filter_shape))
58 bias_shape = [filter_shape[-1]]
77 def build_fused_conv_bias_relu_graph(device, input_shape, filter_shape, strides, argument
102 filt = variables.Variable(random_ops.truncated_normal(filter_shape))
103 bias_shape = [filter_shape[-1]]
134 def _run_graph(self, device, input_shape, filter_shape, strides, padding, argument
157 filter_shape, strides, padding,
170 str(filter_shape).replace(" ", ""),
181 filtershape=str(filter_shape).replace(" ", ""),
/external/tensorflow/tensorflow/lite/kernels/internal/reference/integer_ops/
Dconv.h27 const int8* input_data, const RuntimeShape& filter_shape, in ConvPerChannel() argument
48 TFLITE_DCHECK_EQ(filter_shape.DimensionsCount(), 4); in ConvPerChannel()
51 const int input_depth = MatchingDim(input_shape, 3, filter_shape, 3); in ConvPerChannel()
52 const int output_depth = MatchingDim(filter_shape, 0, output_shape, 3); in ConvPerChannel()
60 const int filter_height = filter_shape.Dims(1); in ConvPerChannel()
61 const int filter_width = filter_shape.Dims(2); in ConvPerChannel()
85 filter_data[Offset(filter_shape, out_channel, filter_y, in ConvPerChannel()
Dfully_connected.h25 const int8_t* input_data, const RuntimeShape& filter_shape, in FullyConnected() argument
37 TFLITE_DCHECK_GE(filter_shape.DimensionsCount(), 2); in FullyConnected()
41 const int filter_dim_count = filter_shape.DimensionsCount(); in FullyConnected()
44 TFLITE_DCHECK_LE(output_depth, filter_shape.Dims(filter_dim_count - 2)); in FullyConnected()
45 const int accum_depth = filter_shape.Dims(filter_dim_count - 1); in FullyConnected()
Ddepthwise_conv.h25 const int8* input_data, const RuntimeShape& filter_shape, in DepthwiseConvPerChannel() argument
46 TFLITE_DCHECK_EQ(filter_shape.DimensionsCount(), 4); in DepthwiseConvPerChannel()
51 const int output_depth = MatchingDim(filter_shape, 3, output_shape, 3); in DepthwiseConvPerChannel()
55 const int filter_height = filter_shape.Dims(1); in DepthwiseConvPerChannel()
56 const int filter_width = filter_shape.Dims(2); in DepthwiseConvPerChannel()
84 filter_shape, 0, filter_y, filter_x, output_channel)]; in DepthwiseConvPerChannel()
/external/tensorflow/tensorflow/lite/kernels/internal/
Ddepthwiseconv_quantized_test.cc108 const RuntimeShape& filter_shape, const uint8* filter_data, in DispatchDepthwiseConv() argument
128 input_shape, filter_shape, stride_width, stride_height, in DispatchDepthwiseConv()
141 params, input_shape, input_data, filter_shape, filter_data, in DispatchDepthwiseConv()
152 input_shape, filter_shape, params); in DispatchDepthwiseConv()
165 params, input_shape, input_data, filter_shape, filter_data, in DispatchDepthwiseConv()
174 input_shape, filter_shape, params); in DispatchDepthwiseConv()
199 params, input_shape, input_data, filter_shape, filter_data, in DispatchDepthwiseConv()
206 input_shape, filter_shape, params); in DispatchDepthwiseConv()
216 params, input_shape, input_data, filter_shape, filter_data, in DispatchDepthwiseConv()
224 input_shape, filter_shape, params); in DispatchDepthwiseConv()
[all …]
/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Ddepthwiseconv_float.h27 const float* input_data, const RuntimeShape& filter_shape, in DepthwiseConv() argument
41 TFLITE_DCHECK_EQ(filter_shape.DimensionsCount(), 4); in DepthwiseConv()
45 const int output_depth = MatchingDim(filter_shape, 3, output_shape, 3); in DepthwiseConv()
49 const int filter_height = filter_shape.Dims(1); in DepthwiseConv()
50 const int filter_width = filter_shape.Dims(2); in DepthwiseConv()
77 filter_shape, 0, filter_y, filter_x, oc)]; in DepthwiseConv()
Ddepthwiseconv_uint8.h95 const RuntimeShape& filter_shape, in Run()
114 TFLITE_DCHECK_EQ(filter_shape.DimensionsCount(), 4); in Run()
119 const int output_depth = MatchingDim(filter_shape, 3, output_shape, 3); in Run()
123 const int filter_height = filter_shape.Dims(1); in Run()
124 const int filter_width = filter_shape.Dims(2); in Run()
152 filter_shape, 0, filter_y, filter_x, oc)]; in Run()
180 const uint8* input_data, const RuntimeShape& filter_shape, in DepthwiseConv() argument
186 input_data, filter_shape, in DepthwiseConv()
Dfully_connected.h67 const uint8* input_data, const RuntimeShape& filter_shape, in FullyConnected() argument
79 TFLITE_DCHECK_GE(filter_shape.DimensionsCount(), 2); in FullyConnected()
89 const int filter_dim_count = filter_shape.DimensionsCount(); in FullyConnected()
91 const int output_depth = MatchingDim(filter_shape, filter_dim_count - 2, in FullyConnected()
93 const int accum_depth = filter_shape.Dims(filter_dim_count - 1); in FullyConnected()
116 const uint8* input_data, const RuntimeShape& filter_shape, in FullyConnected() argument
137 const int filter_dim_count = filter_shape.DimensionsCount(); in FullyConnected()
139 const int output_depth = MatchingDim(filter_shape, filter_dim_count - 2, in FullyConnected()
141 const int accum_depth = filter_shape.Dims(filter_dim_count - 1); in FullyConnected()
/external/tensorflow/tensorflow/lite/testing/nnapi_tflite_zip_tests/
Dtest_manifest.txt341 …tiplier=1,constant_filter=True,data_format='NHWC',dilations=[1,1,1,1],filter_shape=[1,1],input_sha…
342 …tiplier=2,constant_filter=True,data_format='NHWC',dilations=[1,1,1,1],filter_shape=[1,1],input_sha…
343 …tiplier=1,constant_filter=True,data_format='NHWC',dilations=[1,3,2,1],filter_shape=[1,1],input_sha…
344 …tiplier=2,constant_filter=True,data_format='NHWC',dilations=[1,3,2,1],filter_shape=[1,1],input_sha…
345 …tiplier=1,constant_filter=True,data_format='NHWC',dilations=[1,2,2,1],filter_shape=[1,1],input_sha…
346 …tiplier=2,constant_filter=True,data_format='NHWC',dilations=[1,2,2,1],filter_shape=[1,1],input_sha…
347 …tiplier=1,constant_filter=True,data_format='NHWC',dilations=[1,1,1,1],filter_shape=[1,1],input_sha…
348 …tiplier=2,constant_filter=True,data_format='NHWC',dilations=[1,1,1,1],filter_shape=[1,1],input_sha…
349 …tiplier=1,constant_filter=True,data_format='NHWC',dilations=[1,3,2,1],filter_shape=[1,1],input_sha…
350 …tiplier=2,constant_filter=True,data_format='NHWC',dilations=[1,3,2,1],filter_shape=[1,1],input_sha…
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dcudnn_conv_runner.cc64 const Shape* filter_shape; member
119 const Shape& filter_shape = *params.filter_shape; in RunCudnnConvImpl() local
134 VLOG(3) << "filter shape: " << ShapeUtil::HumanStringWithLayout(filter_shape); in RunCudnnConvImpl()
178 dnums, input_shape.layout(), filter_shape.layout(), in RunCudnnConvImpl()
196 filter_shape.dimensions(dnums.kernel_input_feature_dimension())) in RunCudnnConvImpl()
198 filter_shape.dimensions(dnums.kernel_output_feature_dimension())); in RunCudnnConvImpl()
202 filter_shape.dimensions(dnums.kernel_spatial_dimensions(dim))); in RunCudnnConvImpl()
344 params.filter_shape = &rhs_shape; in GetCudnnConvParams()
352 params.filter_shape = &rhs_shape; in GetCudnnConvParams()
360 params.filter_shape = &conv_result_shape; in GetCudnnConvParams()
[all …]
/external/tensorflow/tensorflow/python/ops/
Dnn_ops.py130 filter_shape = filter.get_shape()
133 filter_shape=filter_shape,
160 filter_shape, # pylint: disable=redefined-builtin argument
165 filter_shape = filter_shape.with_rank(input_shape.ndims)
168 input_shape = input_shape.with_rank(filter_shape.ndims)
327 filter_shape=None, argument
475 filter_shape=filter_shape,
504 filter_shape=None, argument
562 if filter_shape is None:
564 filter_shape = ops.convert_to_tensor(filter_shape, name="filter_shape")
[all …]
Dconv2d_benchmark.py44 def build_graph(device, dtype, data_format, input_shape, filter_shape, strides, argument
69 random_ops.truncated_normal(filter_shape, dtype=dtype))
97 def _run_graph(self, device, dtype, data_format, input_shape, filter_shape, argument
122 input_shape, filter_shape, strides,
152 " ", ""), str(filter_shape).replace(" ", ""),
165 filtershape=str(filter_shape).replace(" ", ""),
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/
Dmultithreaded_conv.h137 const float* input_data, const RuntimeShape& filter_shape, in Conv() argument
150 TFLITE_DCHECK_EQ(filter_shape.DimensionsCount(), 4); in Conv()
154 const int input_depth = MatchingDim(input_shape, 3, filter_shape, 3); in Conv()
155 const int output_depth = MatchingDim(filter_shape, 0, output_shape, 3); in Conv()
158 const int filter_height = filter_shape.Dims(1); in Conv()
159 const int filter_width = filter_shape.Dims(2); in Conv()
/external/tensorflow/tensorflow/python/framework/
Dcommon_shapes.py191 filter_shape = op.inputs[1].get_shape().with_rank(4)
207 filter_rows = filter_shape[0]
208 filter_cols = filter_shape[1]
209 depth_out = filter_shape[3]
211 input_shape[3].assert_is_compatible_with(filter_shape[2])
260 filter_shape = op.inputs[1].get_shape().with_rank(4)
266 filter_rows = filter_shape[0]
267 filter_cols = filter_shape[1]
268 depth_out = filter_shape[3] * filter_shape[2]
270 input_shape[3].assert_is_compatible_with(filter_shape[2])
/external/tensorflow/tensorflow/contrib/fused_conv/ops/
Dfused_conv2d_bias_activation_op.cc66 ShapeHandle filter_shape; in __anon4e6e467d0102() local
67 TF_RETURN_IF_ERROR(c->WithRank(c->input(1), rank, &filter_shape)); in __anon4e6e467d0102()
70 c->Dim(filter_shape, in __anon4e6e467d0102()

123