Home
last modified time | relevance | path

Searched refs:weights_shape (Results 1 – 23 of 23) sorted by relevance

/external/tensorflow/tensorflow/python/ops/
Dweights_broadcast_ops.py33 def _has_valid_dims(weights_shape, values_shape): argument
35 None, "has_invalid_dims", (weights_shape, values_shape)) as scope:
39 weights_shape_2d = array_ops.expand_dims(weights_shape, -1)
47 weights_rank, weights_shape, values_rank, values_shape): argument
50 (weights_rank, weights_shape, values_rank, values_shape)) as scope:
55 lambda: _has_valid_dims(weights_shape, values_shape),
84 weights_shape = array_ops.shape(weights, name="shape")
104 weights_shape_static = tensor_util.constant_value(weights_shape)
123 "weights.shape=", weights.name, weights_shape,
131 weights_rank, weights_shape, values_rank, values_shape),
[all …]
Dnn_batchnorm_test.py657 weights_shape, argument
666 size=weights_shape, loc=1.0).astype(np.float32))
673 weights_shape = ([None] * len(weights_shape) if dynshapes else
674 weights_shape)
677 weights = array_ops.placeholder(dtype, shape=weights_shape)
Dmetrics_impl.py121 weights_shape = weights.get_shape()
122 weights_rank = weights_shape.ndims
146 (not weights_shape.dims[-1].is_compatible_with(1))):
/external/tensorflow/tensorflow/lite/kernels/internal/reference/
Dfully_connected.h31 const float* input_data, const RuntimeShape& weights_shape, in FullyConnected() argument
43 const int weights_dims_count = weights_shape.DimensionsCount(); in FullyConnected()
45 const int output_depth = MatchingDim(weights_shape, weights_dims_count - 2, in FullyConnected()
47 const int accum_depth = weights_shape.Dims(weights_dims_count - 1); in FullyConnected()
170 const uint8* input_data, const RuntimeShape& weights_shape, in ShuffledFullyConnected() argument
183 TFLITE_DCHECK_GE(weights_shape.DimensionsCount(), 2); in ShuffledFullyConnected()
191 const int weights_dim_count = weights_shape.DimensionsCount(); in ShuffledFullyConnected()
193 const int output_depth = MatchingDim(weights_shape, weights_dim_count - 2, in ShuffledFullyConnected()
195 const int accum_depth = weights_shape.Dims(weights_dim_count - 1); in ShuffledFullyConnected()
Dreference_ops.h1838 const float* prev_activ_data, const RuntimeShape& weights_shape, in LstmCell() argument
1870 TFLITE_DCHECK_GE(weights_shape.DimensionsCount(), 2); in LstmCell()
1872 const int weights_dim_count = weights_shape.DimensionsCount(); in LstmCell()
1885 TFLITE_DCHECK_EQ(weights_shape.Dims(weights_dim_count - 1), in LstmCell()
1889 MatchingDim(weights_shape, weights_dim_count - 2, bias_shape, 3); in LstmCell()
1890 TFLITE_DCHECK_EQ(weights_shape.FlatSize(), in LstmCell()
1916 FullyConnected(fc_params, concat_temp_shape, concat_temp_data, weights_shape, in LstmCell()
2041 const uint8* prev_activ_data_uint8, const RuntimeShape& weights_shape, in LstmCell() argument
2082 TFLITE_DCHECK_GE(weights_shape.DimensionsCount(), 2); in LstmCell()
2085 const int weights_dim_count = weights_shape.DimensionsCount(); in LstmCell()
[all …]
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dconvert_pure_conv_to_depthwise.cc101 const auto& weights_shape = weights_array.shape(); in Run() local
106 const int depth = weights_shape.dims(0); in Run()
107 const int width = weights_shape.dims(1); in Run()
108 const int height = weights_shape.dims(2); in Run()
Dshuffle_fc_weights.cc91 const Shape& weights_shape = weights_array.shape(); in Run() local
92 if (weights_shape.dimensions_count() != 2) { in Run()
95 const int rows = weights_shape.dims(0); in Run()
96 const int cols = weights_shape.dims(1); in Run()
Dcreate_im2col_arrays.cc40 const auto& weights_shape = weights_array.shape(); in ProcessConvOperator() local
41 const int kheight = weights_shape.dims(1); in ProcessConvOperator()
42 const int kwidth = weights_shape.dims(2); in ProcessConvOperator()
Dfuse_binary_into_following_affine.cc70 const Shape& weights_shape = weights.shape(); in FuseAddOrSubParamsIntoFollowingAffine() local
79 const int output_depth = weights_shape.dims(0); in FuseAddOrSubParamsIntoFollowingAffine()
82 const int weights_size = RequiredBufferSizeForShape(weights_shape); in FuseAddOrSubParamsIntoFollowingAffine()
96 weights_shape.dims(weights_shape.dimensions_count() - 1); in FuseAddOrSubParamsIntoFollowingAffine()
97 const int weights_size = RequiredBufferSizeForShape(weights_shape); in FuseAddOrSubParamsIntoFollowingAffine()
Densure_bias_vectors.cc31 const auto& weights_shape = model.GetArray(weights_name).shape(); in GetOutputDepthFromWeights() local
34 return weights_shape.dims(0); in GetOutputDepthFromWeights()
37 return weights_shape.dims(3); in GetOutputDepthFromWeights()
Dpropagate_fixed_sizes.cc140 const auto& weights_shape = weights_array.shape(); in ProcessConvOperator() local
141 CHECK_EQ(weights_shape.dimensions_count(), 4); in ProcessConvOperator()
144 const int output_depth = weights_shape.dims(0); in ProcessConvOperator()
145 const int kheight = weights_shape.dims(1); in ProcessConvOperator()
146 const int kwidth = weights_shape.dims(2); in ProcessConvOperator()
157 const int input_depth = weights_shape.dims(3); in ProcessConvOperator()
202 const auto& weights_shape = weights_array.shape(); in ProcessTransposeConvOperator() local
203 CHECK_EQ(weights_shape.dimensions_count(), 4) in ProcessTransposeConvOperator()
206 << toco::ShapeToString(weights_shape) << "."; in ProcessTransposeConvOperator()
209 const int kheight = weights_shape.dims(1); in ProcessTransposeConvOperator()
[all …]
Dfuse_binary_into_preceding_affine.cc112 const Shape& weights_shape = weights.shape(); in FuseMulOrDivParamsIntoPrecedingAffine() local
140 output_depth = weights_shape.dims(0); in FuseMulOrDivParamsIntoPrecedingAffine()
142 output_depth = weights_shape.dims(weights_shape.dimensions_count() - 1); in FuseMulOrDivParamsIntoPrecedingAffine()
147 const int weights_size = RequiredBufferSizeForShape(weights_shape); in FuseMulOrDivParamsIntoPrecedingAffine()
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/
Dbinary_tensor_weight_broadcast_test.py46 for weights_shape in [
56 a = self._ConstOp(weights_shape)
59 a = self._ConstOp(weights_shape)
Dconv2d_test.py44 weights_shape = (kernel_size[0], kernel_size[1], nchan, filters)
45 weights = constant_op.constant(np.random.randn(*weights_shape), dtype=dtype)
207 weights_shape = [2, 2, num_filters, c]
209 np.random.randn(*weights_shape), dtype=dtype)
/external/tensorflow/tensorflow/contrib/quantize/python/
Dfold_batch_norms.py913 weights_shape = weights.get_shape()
914 if (len(input_shape) != 4 or len(weights_shape) != 4 or
915 input_shape[3] != weights_shape[2]):
917 (op_name, input_shape, weights_shape))
930 weights_shape = weights.get_shape()
932 if (len(weights_shape) != 2 or len(input_shape) != 2 or
933 weights_shape[1] != input_shape[0]):
935 (op_name, weights_shape, input_shape))
/external/tensorflow/tensorflow/contrib/losses/python/losses/
Dloss_ops.py109 weights_shape = weights.get_shape()
110 if weights_shape.ndims is None:
113 if weights_shape.ndims > 1 and weights_shape.dims[-1].is_compatible_with(1):
/external/tensorflow/tensorflow/python/keras/utils/
Dlosses_utils.py113 weights_shape = sample_weight.get_shape()
114 weights_rank = weights_shape.ndims
/external/tensorflow/tensorflow/python/ops/losses/
Dlosses_impl.py818 weights_shape = weights.get_shape()
819 weights_rank = weights_shape.ndims
831 weights_rank > 0 and weights_shape.dims[-1].is_compatible_with(1)):
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/
Doptimized_ops.h295 const RuntimeShape& weights_shape, in GEMVForLstmCell() argument
303 TFLITE_DCHECK_GE(weights_shape.DimensionsCount(), 2); in GEMVForLstmCell()
306 const int weights_dim_count = weights_shape.DimensionsCount(); in GEMVForLstmCell()
309 const int output_size = MatchingDim(weights_shape, weights_dim_count - 2, in GEMVForLstmCell()
484 const RuntimeShape& weights_shape, const uint8* weights_data, in GEMVForLstmCellWithSymmetricRange() argument
490 TFLITE_DCHECK_GE(weights_shape.DimensionsCount(), 2); in GEMVForLstmCellWithSymmetricRange()
493 const int weights_dim_count = weights_shape.DimensionsCount(); in GEMVForLstmCellWithSymmetricRange()
496 const int output_size = MatchingDim(weights_shape, weights_dim_count - 2, in GEMVForLstmCellWithSymmetricRange()
775 const float* input_data, const RuntimeShape& weights_shape, in FullyConnected() argument
791 const int dims_count = weights_shape.DimensionsCount(); in FullyConnected()
[all …]
/external/tensorflow/tensorflow/contrib/lite/kernels/internal/optimized/
Doptimized_ops.h417 const RuntimeShape& weights_shape, in GEMVForLstmCell() argument
425 TFLITE_DCHECK_GE(weights_shape.DimensionsCount(), 2); in GEMVForLstmCell()
428 const int weights_dim_count = weights_shape.DimensionsCount(); in GEMVForLstmCell()
431 const int output_size = MatchingDim(weights_shape, weights_dim_count - 2, in GEMVForLstmCell()
606 const RuntimeShape& weights_shape, const uint8* weights_data, in GEMVForLstmCellWithSymmetricRange() argument
612 TFLITE_DCHECK_GE(weights_shape.DimensionsCount(), 2); in GEMVForLstmCellWithSymmetricRange()
615 const int weights_dim_count = weights_shape.DimensionsCount(); in GEMVForLstmCellWithSymmetricRange()
618 const int output_size = MatchingDim(weights_shape, weights_dim_count - 2, in GEMVForLstmCellWithSymmetricRange()
897 const float* input_data, const RuntimeShape& weights_shape, in FullyConnected() argument
913 const int dims_count = weights_shape.DimensionsCount(); in FullyConnected()
[all …]
/external/tensorflow/tensorflow/lite/toco/
Dtooling_util.cc2369 const auto& weights_shape = weights_array.shape(); in UndoWeightsShuffling() local
2370 QCHECK_EQ(weights_shape.dimensions_count(), 2); in UndoWeightsShuffling()
2371 const int rows = weights_shape.dims(0); in UndoWeightsShuffling()
2372 const int cols = weights_shape.dims(1); in UndoWeightsShuffling()
Dexport_tensorflow.cc1484 const auto& weights_shape = weights_array.shape(); in ConvertLstmCellOperator() local
1485 CHECK_EQ(weights_shape.dimensions_count(), 2); in ConvertLstmCellOperator()
1490 ConvertFloatTensorConst(weights_output, weights_shape, weights_data, in ConvertLstmCellOperator()
/external/tensorflow/tensorflow/contrib/layers/python/layers/
Dlayers.py1270 weights_shape = [kernel_h, kernel_w, 1, 1]
1275 shape=weights_shape,