Home
last modified time | relevance | path

Searched refs:shape_attr (Results 1 – 8 of 8) sorted by relevance

/external/tensorflow/tensorflow/core/ops/
Dfunction_ops.cc39 const AttrValue* shape_attr = context->attrs().Find("_handle_shapes"); in __anona02766840102() local
40 if (dtype_attr && shape_attr) { in __anona02766840102()
44 shape_attr->DebugString()); in __anona02766840102()
46 if (shape_attr->list().shape().empty()) { in __anona02766840102()
49 shape_attr->DebugString()); in __anona02766840102()
52 const TensorShapeProto& shape_proto = shape_attr->list().shape(0); in __anona02766840102()
64 const AttrValue* shape_attr = context->attrs().Find("_output_shapes"); in __anona02766840102() local
65 if (shape_attr && shape_attr->has_list()) { in __anona02766840102()
66 if (shape_attr->list().shape().empty()) { in __anona02766840102()
69 shape_attr->DebugString()); in __anona02766840102()
[all …]
/external/tensorflow/tensorflow/core/framework/
Dfunction_test.cc1497 AttrValue shape_attr; in TEST() local
1498 TensorShapeProto* shape_proto = shape_attr.mutable_list()->add_shape(); in TEST()
1504 (*arg_attrs.mutable_attr())["_output_shapes"] = std::move(shape_attr); in TEST()
1521 const auto& shape_attr = attr.list().shape(0); in TEST() local
1522 ASSERT_FALSE(shape_attr.unknown_rank()); in TEST()
1523 ASSERT_EQ(shape_attr.dim_size(), 4); in TEST()
1524 EXPECT_EQ(shape_attr.dim(0).size(), 2); in TEST()
1525 EXPECT_EQ(shape_attr.dim(1).size(), 4); in TEST()
1526 EXPECT_EQ(shape_attr.dim(2).size(), 6); in TEST()
1527 EXPECT_EQ(shape_attr.dim(3).size(), 8); in TEST()
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Dprepare_tf.cc405 auto shape_attr = DenseElementsAttr::get(shape_type, result_shape_data); in legalizeFilter() local
406 auto shape = rewriter.create<TF::ConstOp>(loc, shape_type, shape_attr); in legalizeFilter()
466 auto shape_attr = DenseElementsAttr::get(shape_type, result_shape_data); in matchAndRewrite() local
467 auto shape = rewriter.create<ConstantOp>(loc, shape_type, shape_attr); in matchAndRewrite()
Dextract_ophint.cc226 auto shape_attr = in GetAggregatedInputs() local
228 auto shape = builder->create<ConstantOp>(loc, shape_type, shape_attr); in GetAggregatedInputs()
/external/tensorflow/tensorflow/compiler/tf2xla/ops/
Dxla_ops.cc408 TensorShape shape_attr; in __anon00ae58f50302() local
409 TF_RETURN_IF_ERROR(c->GetAttr("shape", &shape_attr)); in __anon00ae58f50302()
411 TF_RETURN_IF_ERROR(c->MakeShapeFromTensorShape(shape_attr, &s)); in __anon00ae58f50302()
/external/tensorflow/tensorflow/tools/graph_transforms/
Dfold_constants_test.cc145 tensorflow::AttrValue shape_attr; in TestPreserveOutputShapes() local
146 auto* shape_proto = shape_attr.mutable_list()->add_shape(); in TestPreserveOutputShapes()
153 placeholder.node()->AddAttr("_output_shapes", shape_attr); in TestPreserveOutputShapes()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_ops.cc614 if (auto shape_attr = shape.dyn_cast_or_null<DenseIntElementsAttr>()) in fold() local
615 shapes.push_back(shape_attr); in fold()
2394 DenseIntElementsAttr shape_attr; in GetSlicedShapeAndBoundRanges() local
2396 if (!matchPattern(this->shape(), m_Constant(&shape_attr)) || in GetSlicedShapeAndBoundRanges()
2402 int rank = std::distance(shape_attr.begin(), shape_attr.end()); in GetSlicedShapeAndBoundRanges()
2413 for (const APInt &dim : shape_attr) shape->push_back(dim.getSExtValue()); in GetSlicedShapeAndBoundRanges()
/external/tensorflow/tensorflow/core/common_runtime/
Ddirect_session_test.cc2408 AttrValue shape_attr; in CreateIdentityGraphDef() local
2409 shape_attr.mutable_shape()->set_unknown_rank(true); in CreateIdentityGraphDef()
2415 placeholder->mutable_attr()->insert({"shape", shape_attr}); in CreateIdentityGraphDef()