- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for shape_handle (0.2 sec)
-
tensorflow/c/ops.cc
return reinterpret_cast<InferenceContext*>(ctx)->Rank( *reinterpret_cast<ShapeHandle*>(handle)); } void TF_ShapeInferenceContextDim(TF_ShapeInferenceContext* ctx, TF_ShapeHandle* shape_handle, int64_t i, TF_DimensionHandle* result) { int64_t rank = TF_ShapeInferenceContextRank(ctx, shape_handle); auto* cc_result = reinterpret_cast<DimensionHandle*>(result);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jul 28 22:41:35 UTC 2022 - 10.9K bytes - Viewed (0) -
tensorflow/c/ops.h
TF_ShapeInferenceContext* ctx, TF_ShapeHandle* shape_handle, int64_t i, TF_DimensionHandle* result); // Returns in <*result> a sub-shape of <shape_handle>, with dimensions // [start:end]. <start> and <end> can be negative, to index from the end of the // shape. <start> and <end> are set to the rank of <shape_handle> if > rank of // <shape_handle>. TF_CAPI_EXPORT extern void TF_ShapeInferenceContextSubshape(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 27 21:07:00 UTC 2023 - 16.3K bytes - Viewed (0) -
tensorflow/c/c_api_experimental.cc
TF_ShapeAndTypeList* output_shapes_result = TF_NewShapeAndTypeList(c.num_outputs()); for (int i = 0; i < c.num_outputs(); ++i) { ShapeHandle shape_handle = c.output(i); TF_ShapeAndType& shape = output_shapes_result->items[i]; shape.num_dims = c.Rank(shape_handle); if (shape.num_dims == InferenceContext::kUnknownRank) { shape.dims = nullptr; continue; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 15 03:35:10 UTC 2024 - 29.4K bytes - Viewed (0) -
tensorflow/c/c_api.cc
num_shapes_and_types); for (int i = 0; i < num_shapes_and_types; ++i) { tensorflow::shape_inference::ShapeHandle shape_handle = ShapeHandleFromDims(ic, ranks[i], shapes[i]); shape_and_type_vec[i] = tensorflow::shape_inference::ShapeAndType( shape_handle, static_cast<DataType>(types[i])); } ic->set_output_handle_shapes_and_types(output.index, shape_and_type_vec); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 15 03:35:10 UTC 2024 - 102.3K bytes - Viewed (0) -
tensorflow/c/ops_test.cc
NodeDef def; shape_inference::InferenceContext c(0, def, MakeOpDef(1, 0), {S({10, 20, 30})}, {}, {}, {}); shape_inference::ShapeHandle in0 = c.input(0); shape_inference::ShapeHandle s1; TF_Status* status = TF_NewStatus(); TF_ShapeInferenceContextWithRankAtMost(C_CTX(&c), C_SHP(&in0), 3, C_SHP(&s1), status);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Aug 11 01:20:50 UTC 2021 - 12.6K bytes - Viewed (0) -
tensorflow/c/kernels/bitcast_op_test.cc
.Input(FakeInput(DT_INT64)) .Finalize(&def)); shape_inference::InferenceContext c(0, def, op_def, {S({3, 4})}, {}, {}, {}); std::vector<shape_inference::ShapeHandle> input_shapes; TF_CHECK_OK(c.input("input", &input_shapes)); ASSERT_EQ("[3,4]", c.DebugString(input_shapes[0])); TF_CHECK_OK(reg->shape_inference_fn(&c)); ASSERT_EQ("[3,4,8]", c.DebugString(c.output(0))); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Jul 18 15:10:51 UTC 2022 - 5.5K bytes - Viewed (0) -
tensorflow/compiler/jit/shape_inference.cc
namespace { // Converts a shape inference handle to a PartialTensorShape. Status ShapeHandleToTensorShape(shape_inference::InferenceContext* context, const shape_inference::ShapeHandle& handle, PartialTensorShape* shape) { // The default is already unknown if (!context->RankKnown(handle)) return absl::OkStatus(); std::vector<int64_t> dims(context->Rank(handle));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 31 00:41:19 UTC 2024 - 13K bytes - Viewed (0) -
tensorflow/compiler/aot/aot_only_var_handle_op.cc
c->set_output(0, c->Scalar()); DataType t; TF_RETURN_IF_ERROR(c->GetAttr("dtype", &t)); PartialTensorShape p; TF_RETURN_IF_ERROR(c->GetAttr("shape", &p)); shape_inference::ShapeHandle s; TF_RETURN_IF_ERROR(c->MakeShapeFromPartialTensorShape(p, &s)); c->set_output_handle_shapes_and_types( 0, std::vector<shape_inference::ShapeAndType>{{s, t}}); return absl::OkStatus();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 28 09:57:04 UTC 2024 - 3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/translate/import_model.cc
// after the shape refine. auto same_inferred_shape = [](shape_inference::InferenceContext* c, shape_inference::ShapeHandle s0, shape_inference::ShapeHandle s1) -> bool { if (s0.SameHandle(s1) || (!c->RankKnown(s0) && !c->RankKnown(s1))) { return true; } if (c->Rank(s0) != c->Rank(s1)) { return false;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 01 11:17:36 UTC 2024 - 183.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc
value_port, [this](const ValuePort& port) { return results_[port]; }); RecordValue(value_port, attr); return attr; } // Returns ShapeHandle if the op result could be computed as shape. ShapeHandle ComputeOutputAsShape(OpResult result, InferenceContext* ic); void RecordValue(const ValuePort& value_port, Attribute value) { LLVM_DEBUG(value_port.print(llvm::dbgs() << "\trecording ")
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Jun 08 07:28:49 UTC 2024 - 134.1K bytes - Viewed (0)