Searched defs:reshape (Results 1 - 25 of 28) sorted by relevance

12

/external/tensorflow/tensorflow/compiler/xla/tests/
H A Dbitcast_convert_test.cc127 // input -> reshape -> convert
129 // input -> convert -> reshape
134 auto reshape = builder.Reshape(input, /*dimensions=*/{0}, /*new_sizes=*/{}); local
135 builder.BitcastConvertType(reshape, F32);
H A Dconvert_test.cc198 // input -> reshape -> convert
200 // input -> convert -> reshape
205 auto reshape = builder.Reshape(input, /*dimensions=*/{0}, /*new_sizes=*/{}); local
206 builder.ConvertElementType(reshape, F32);
H A Dreshape_test.cc104 auto reshape = builder.Reshape(/*operand=*/parameter, /*dimensions=*/{0, 1}, local
106 auto new_shape = builder.GetShape(reshape).ConsumeValueOrDie();
121 auto reshape = local
540 // As above, but uses reshape directly.
691 // Tests R2->R4 reshape with the reshape dimensions {1, 0}.
762 // Tests R4->R2 reshape with the reshape dimensions {0, 2, 1, 3}.
818 // Since the reshape is a no-op, verify that it does not change the underlying
893 // Specify the requested output shape explicitly to ensure that this reshape
[all...]
H A Dselect_and_scatter_test.cc259 const auto reshape = local
263 builder_.SelectAndScatter(reshape, ge_s32_, /*window_dimensions=*/{2, 3},
H A Dmultioutput_fusion_test.cc137 HloInstruction* reshape = local
144 ShapeUtil::MakeShape(F32, {1}), sub, reshape, dot_dnums));
156 TF_CHECK_OK(reshape->ReplaceOperandWith(0, gte1));
H A Dreduce_test.cc526 auto reshape = builder.Reshape(log_, {rows, cols}); local
527 builder.Reduce(reshape, zero, add_f32, /*dimensions_to_reduce=*/{0});
843 // These should be simplified into a reshape.
H A Dfusion_test.cc323 auto reshape = builder.AddInstruction(HloInstruction::CreateReshape( local
326 ->CreateFusionInstruction(/*instructions_to_fuse=*/{reshape},
/external/tensorflow/tensorflow/contrib/lite/kernels/
H A Dreshape.cc25 namespace reshape { namespace in namespace:tflite::ops::builtin
81 } // namespace reshape
84 static TfLiteRegistration r = {nullptr, nullptr, reshape::Prepare,
85 reshape::Eval};
/external/clang/test/Analysis/
H A Dmalloc-interprocedural.c77 static char *reshape(char *in) { function
83 v = reshape(v);
84 v = reshape(v);// expected-warning {{Potential leak of memory pointed to by 'v'}}
/external/tensorflow/tensorflow/compiler/xla/service/
H A Dreshape_mover_test.cc74 // Verifies that the reshape is not moved, since rng0 is trivially reshapable
294 // where there is only 1 non-trivial reshape (reshape0), we sink the reshape
339 // There is 1 non-trivial reshape (reshape0). It's not clear whether reshape1
465 // reshape [128,1] constant [128,1024]
469 // The reshape mover would like to sink the reshape below the multiply.
471 // Previously we would attempt to insert a reshape of the constant to [1,128,1]
473 // preparation for sinking the reshape.
475 // To eliminate the unsoundness, we outlaw reshape sinkin
492 auto reshape = builder.AddInstruction(HloInstruction::CreateReshape( local
[all...]
H A Duser_computation_test.cc256 // reshape |
270 const HloInstruction* reshape = broadcast->operand(0); local
271 EXPECT_TRUE(reshape->has_sharding());
322 // reshape and a broadcast.
326 // broadcast reshape
H A Dlayout_assignment_test.cc321 // param -> log -> reshape -> tanh
329 auto reshape = local
332 HloInstruction::CreateUnary(bshape, HloOpcode::kTanh, reshape));
355 AsInt64Slice(reshape->shape().layout().minor_to_major());
517 // param0 -> concatenate -> reshape
529 auto reshape = builder.AddInstruction( local
533 module->AddEntryComputation(builder.Build(reshape));
H A Dhlo_instruction_test.cc1094 HloInstruction* reshape = local
1100 HloInstruction::CreateDot(sout, x, reshape, dot_dnums));
1105 {dot, reshape}, HloInstruction::FusionKind::kTransposeDot);
1233 HloInstruction* reshape = local
1239 HloInstruction::CreateDot(sout, x, reshape, dot_dnums));
1250 {dot, reshape}, HloInstruction::FusionKind::kTransposeDot);
H A Dhlo_verifier.cc188 Status ShapeVerifier::HandleReshape(HloInstruction* reshape) { argument
190 TF_RETURN_IF_ERROR(CheckShape(reshape, reshape->shape()));
191 TF_RET_CHECK(ShapeUtil::ElementsIn(reshape->shape()) ==
192 ShapeUtil::ElementsIn(reshape->operand(0)->shape()));
H A Dalgebraic_simplifier.cc74 // Returns true if the given reshape produces a result which is bit-wise
78 // reshape may still be a bitcast. For example, a reshape from [28x28] to [784].
80 const HloInstruction* reshape,
82 CHECK_EQ(HloOpcode::kReshape, reshape->opcode());
84 const HloInstruction* operand = reshape->operand(0);
87 return ShapeUtil::ReshapeIsBitcast(operand->shape(), reshape->shape()) &&
88 valid_bitcast_callback(operand->shape(), reshape->shape());
157 Status HandleReshape(HloInstruction* reshape) override;
710 // reshape(resul
79 ReshapeIsBitcast( const HloInstruction* reshape, const AlgebraicSimplifier::ValidBitcastCallback& valid_bitcast_callback) argument
1495 HandleReshape(HloInstruction* reshape) argument
1685 auto reshape = computation_->AddInstruction( local
[all...]
H A Dalgebraic_simplifier_test.cc1211 // Test that a reshape which could be replaced with a bitcast is not if
1218 HloInstruction* reshape = local
1223 *reshape->mutable_shape()->mutable_layout() =
1281 // Verify that only the first reshape is replaced.
1313 // Regression test for a bug in the reshape sinking transformation, where
1314 // moving a reshape to a scalar led to a crash.
1320 HloInstruction* reshape = builder.AddInstruction( local
1325 ShapeUtil::MakeShape(F32, {3}), HloOpcode::kMaximum, reshape, zero)); local
1340 // Regression test for a bug where if we failed to sink a reshape, we'd set the
1363 // Regression test for a bug where if we failed to sink a reshape, w
2209 HloInstruction* reshape = builder.AddInstruction( local
[all...]
/external/tensorflow/tensorflow/contrib/metrics/python/kernel_tests/
H A Dhistogram_ops_test.py237 def reshape(scores): function in function:synthetic_data
240 false_scores = reshape(false_scores)
241 true_scores = reshape(true_scores)
/external/tensorflow/tensorflow/contrib/labeled_tensor/python/ops/
H A Dops.py300 def reshape(labeled_tensor, existing_axes, new_axes, name=None): function
368 reshaped_tensor = array_ops.reshape(
398 return reshape(labeled_tensor, [existing_name], [new_axis], name=scope)
817 'Use transpose and reshape to create a single shared axis to sum '
851 a_tensor = array_ops.reshape(a.tensor, (1, -1))
859 b_tensor = array_ops.reshape(b.tensor, (-1, 1))
/external/tensorflow/tensorflow/contrib/labeled_tensor/
H A D__init__.py107 reshape = _ops.reshape variable
/external/eigen/unsupported/Eigen/CXX11/src/Tensor/
H A DTensorBase.h738 reshape(const NewDimensions& newDimensions) const { function in class:Eigen::TensorBase
907 reshape(const NewDimensions& newDimensions) const { function in class:Eigen::TensorBase
912 reshape(const NewDimensions& newDimensions) { function in class:Eigen::TensorBase
/external/tensorflow/tensorflow/compiler/xla/
H A Dliteral_util_test.cc546 auto reshape = original->Reshape(/*dimensions=*/{}).ConsumeValueOrDie(); local
547 EXPECT_EQ(*original, *reshape);
565 auto reshape = original->Reshape({3, 4, 2}).ConsumeValueOrDie(); local
567 EXPECT_EQ(*expected, *reshape);
585 auto reshape = original->Reshape({3, 4, 2}).ConsumeValueOrDie(); local
587 EXPECT_EQ(*expected, *reshape);
592 auto reshape = original->Transpose(/*permutation=*/{}); local
593 EXPECT_EQ(*original, *reshape);
605 auto reshape = original->Transpose(/*permutation=*/{2, 3, 0, 1}); local
607 reshape
[all...]
/external/tensorflow/tensorflow/contrib/keras/api/keras/backend/
H A D__init__.py117 from tensorflow.python.keras._impl.keras.backend import reshape namespace
/external/tensorflow/tensorflow/core/grappler/optimizers/
H A Darithmetic_optimizer_test.cc613 // The target shape of the reshape is the concatenation of `batch_size` and
620 Output reshape = ops::Reshape(s, inputs, target_shape); local
621 Output outputs = ops::Identity(s.WithOpName("outputs"), reshape);
644 Output reshape = ops::Reshape(s, inputs, ops::Const(s, {8, -1, 28, 28}, {4})); local
645 Output outputs = ops::Identity(s.WithOpName("outputs"), reshape);
666 Output reshape = ops::Reshape(s, inputs, ops::Const(s, {-1, -1}, {2})); local
667 Output outputs = ops::Identity(s.WithOpName("outputs"), reshape);
H A Dconstant_folding_test.cc1214 // Build a simple graph with a reshape that can be reduced to the identity.
1217 // A reshape than can be optimized
1227 // A multi dimensional reshape than can be optimized
1235 // A multi dimensional partially defined reshape than can be optimized
1243 // A reshape that can't be optimized
1391 Output reshape = ops::Reshape(s.WithOpName("reshape"), sum, size); local
1395 item.fetch.push_back("reshape");
/external/tensorflow/tensorflow/python/keras/backend/
H A D__init__.py117 from tensorflow.python.keras._impl.keras.backend import reshape namespace

Completed in 587 milliseconds

12