Home
last modified time | relevance | path

Searched refs:scale_shape (Results 1 – 15 of 15) sorted by relevance

/external/tensorflow/tensorflow/compiler/tests/
Dfused_batchnorm_test.py92 scale_shape = [channel]
94 scale_val = np.random.random_sample(scale_shape).astype(np.float32)
95 offset_val = np.random.random_sample(scale_shape).astype(np.float32)
112 scale = array_ops.placeholder(np.float32, shape=scale_shape, name="scale")
114 np.float32, shape=scale_shape, name="offset")
136 scale_shape = [channel]
138 scale_val = np.random.random_sample(scale_shape).astype(np.float32)
139 offset_val = np.random.random_sample(scale_shape).astype(np.float32)
140 mean_val = np.random.random_sample(scale_shape).astype(np.float32)
141 var_val_corr = np.random.random_sample(scale_shape).astype(np.float32)
[all …]
/external/tensorflow/tensorflow/python/ops/
Dnn_fused_batchnorm_test.py63 scale_shape, argument
70 scale_val = np.random.random_sample(scale_shape).astype(scale_dtype)
71 offset_val = np.random.random_sample(scale_shape).astype(scale_dtype)
72 mean_val = np.random.random_sample(scale_shape).astype(scale_dtype)
73 var_val = np.random.random_sample(scale_shape).astype(scale_dtype)
144 scale_shape, argument
151 scale_val = np.random.random_sample(scale_shape).astype(scale_dtype)
152 offset_val = np.random.random_sample(scale_shape).astype(scale_dtype)
157 old_mean_val = np.random.random_sample(scale_shape).astype(scale_dtype)
158 old_var_val = np.random.random_sample(scale_shape).astype(scale_dtype)
[all …]
Dquantized_ops_test.py66 scale_shape = [1] * len(shape)
67 scale_shape[axis] = shape[axis]
68 out *= np.arange(1, shape[axis] + 1).reshape(scale_shape)
Ddequantize_op_test.py106 scale_shape = [1] * len(shape)
107 scale_shape[axis] = shape[axis]
108 out *= np.arange(1, shape[axis] + 1).reshape(scale_shape)
Dinit_ops.py414 scale_shape = shape
416 scale_shape = partition_info.full_shape
422 for dim in scale_shape[:-1]:
498 scale_shape = shape
500 scale_shape = partition_info.full_shape
501 fan_in, fan_out = _compute_fans(scale_shape)
/external/tensorflow/tensorflow/lite/testing/op_tests/
Dglobal_batch_norm.py40 scale_shape = input_shape[3]
42 scale = create_tensor_data(parameters["dtype"], scale_shape)
43 offset = create_tensor_data(parameters["dtype"], scale_shape)
44 mean = create_tensor_data(parameters["dtype"], scale_shape)
45 variance = create_tensor_data(parameters["dtype"], scale_shape)
Dfused_batch_norm.py49 scale_shape = input_shape[3]
51 scale = create_tensor_data(parameters["dtype"], scale_shape)
52 offset = create_tensor_data(parameters["dtype"], scale_shape)
53 mean = create_tensor_data(parameters["dtype"], scale_shape)
54 variance = create_tensor_data(parameters["dtype"], scale_shape)
/external/tensorflow/tensorflow/compiler/xla/service/
Dbatchnorm_expander_test.cc58 Shape scale_shape = ShapeUtil::MakeShape(F32, {2}); in TEST_F() local
66 HloInstruction::CreateParameter(1, scale_shape, "scale")); in TEST_F()
72 ShapeUtil::MakeTupleShape({input_shape, scale_shape, offset_shape}), in TEST_F()
93 Shape scale_shape = ShapeUtil::MakeShape(F32, {2}); in TEST_F() local
103 HloInstruction::CreateParameter(1, scale_shape, "scale")); in TEST_F()
115 ShapeUtil::MakeTupleShape({input_shape, scale_shape, mean_shape}), param0, in TEST_F()
Dshape_inference.cc1211 const Shape& operand_shape, const Shape& scale_shape, in InferBatchNormTrainingShape() argument
1218 ExpectArray(scale_shape, "scale input of batch norm training")); in InferBatchNormTrainingShape()
1224 TF_RET_CHECK(ShapeUtil::ValidateShapeWithOptionalLayout(scale_shape) == in InferBatchNormTrainingShape()
1256 if (scale_shape.rank() != 1) { in InferBatchNormTrainingShape()
1260 scale_shape.rank()); in InferBatchNormTrainingShape()
1280 if (!ShapeUtil::SameElementTypeIgnoringFpPrecision(scale_shape, in InferBatchNormTrainingShape()
1286 PrimitiveType_Name(scale_shape.element_type()), in InferBatchNormTrainingShape()
1302 if (ShapeUtil::GetDimension(scale_shape, 0) != feature_count) { in InferBatchNormTrainingShape()
1307 ShapeUtil::GetDimension(scale_shape, 0), feature_count); in InferBatchNormTrainingShape()
1316 const Shape& operand_shape, const Shape& scale_shape, in InferBatchNormInferenceShape() argument
[all …]
Dshape_inference.h89 const Shape& scale_shape,
96 const Shape& operand_shape, const Shape& scale_shape,
102 const Shape& scale_shape,
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dgpu_layout_assignment_test.cc262 Shape scale_shape = in TEST_F() local
267 ShapeUtil::MakeTupleShape({shape, scale_shape, scale_shape}); in TEST_F()
282 HloInstruction::CreateParameter(1, scale_shape, "scale")); in TEST_F()
284 HloInstruction::CreateParameter(2, scale_shape, "mean")); in TEST_F()
286 HloInstruction::CreateParameter(3, scale_shape, "var")); in TEST_F()
318 {result_shape, scale_shape, scale_shape})); in TEST_F()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dremapper_test.cc760 auto scale_shape = ops::Placeholder::Shape({128}); in TEST_F() local
764 auto scale = Placeholder(s.WithOpName("scale"), DT_FLOAT, scale_shape); in TEST_F()
765 auto offset = Placeholder(s.WithOpName("offset"), DT_FLOAT, scale_shape); in TEST_F()
766 auto mean = Placeholder(s.WithOpName("mean"), DT_FLOAT, scale_shape); in TEST_F()
767 auto variance = Placeholder(s.WithOpName("variance"), DT_FLOAT, scale_shape); in TEST_F()
839 auto scale_shape = ops::Placeholder::Shape({128}); in TEST_F() local
843 auto scale = Placeholder(s.WithOpName("scale"), DT_FLOAT, scale_shape); in TEST_F()
844 auto offset = Placeholder(s.WithOpName("offset"), DT_FLOAT, scale_shape); in TEST_F()
845 auto mean = Placeholder(s.WithOpName("mean"), DT_FLOAT, scale_shape); in TEST_F()
847 Placeholder(s.WithOpName("variance"), DT_FLOAT, scale_shape); in TEST_F()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dimage_ops.cc226 const TensorShape& scale_shape = context->InputShape(1); in Compile() local
230 OP_REQUIRES(context, TensorShapeUtils::IsScalar(scale_shape), in Compile()
232 scale_shape.DebugString())); in Compile()
/external/tensorflow/tensorflow/compiler/xla/client/
Dxla_builder.cc2647 TF_ASSIGN_OR_RETURN(const Shape* scale_shape, GetShapePtr(scale)); in BatchNormTraining()
2652 *operand_shape, *scale_shape, *offset_shape, feature_index)); in BatchNormTraining()
2670 TF_ASSIGN_OR_RETURN(const Shape* scale_shape, GetShapePtr(scale)); in BatchNormInference()
2676 *operand_shape, *scale_shape, *offset_shape, in BatchNormInference()
2695 TF_ASSIGN_OR_RETURN(const Shape* scale_shape, GetShapePtr(scale)); in BatchNormGrad()
2702 *operand_shape, *scale_shape, *batch_mean_shape, in BatchNormGrad()
/external/tensorflow/tensorflow/python/kernel_tests/
Darray_ops_test.py1616 scale_shape = [1] * len(shape)
1617 scale_shape[axis] = shape[axis]
1618 out *= np.arange(1, shape[axis] + 1).reshape(scale_shape)