Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for TensorSpecProto (0.4 sec)

  1. tensorflow/c/experimental/saved_model/core/signature_flattening_test.cc

    TEST(SignatureFlatteningTest, ZeroRetOutputSignature) {
      std::vector<const TensorSpecProto*> flattened;
      StructuredValue value = testing::ZeroReturnOutputSignature();
      TF_EXPECT_OK(internal::FlattenSignature(value, &flattened));
      EXPECT_EQ(flattened.size(), 0);
    }
    
    TEST(SignatureFlatteningTest, SingleArgInputSignature) {
      std::vector<const TensorSpecProto*> flattened;
      StructuredValue value = testing::SingleArgInputSignature();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 06 21:36:59 UTC 2020
    - 5.9K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/saved_model/core/tensor_spec.h

    #include "tensorflow/core/framework/types.pb.h"
    #include "tensorflow/core/protobuf/struct.pb.h"
    
    namespace tensorflow {
    
    // Note(bmzhao): TensorSpec deliberately does not store the "name" from a
    // TensorSpecProto. From edloper@, "Names should really be associated with
    // parameters, not the tensors inside those parameters. This would be
    // inconsistent with the corresponding Python class, but I don't think that's
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 29 23:11:59 UTC 2020
    - 1.8K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/saved_model/core/tensor_spec.cc

        : shape_(std::initializer_list<int64_t>()), dtype_(DT_FLOAT) {}
    
    TensorSpec::TensorSpec(PartialTensorShape shape, DataType dtype)
        : shape_(std::move(shape)), dtype_(dtype) {}
    
    TensorSpec::TensorSpec(const TensorSpecProto& proto)
        : shape_(proto.shape()), dtype_(proto.dtype()) {}
    
    const PartialTensorShape& TensorSpec::shape() const { return shape_; }
    
    DataType TensorSpec::dtype() const { return dtype_; }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/saved_model/core/saved_model_utils.h

    // Flattens `signature` into a vector of TensorSpecProto pointers back into
    // `signature`. `signature` must outlive flattened_specs. `signature` must also
    // be the input or output signature of a SavedConcreteFunction (i.e. "nested
    // structures of tensorspecs").
    Status FlattenSignature(const StructuredValue& signature,
                            std::vector<const TensorSpecProto*>* flattened_specs);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 13 04:18:52 UTC 2022
    - 5.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.h

    // Converts an MLIR shaped type to a TensorFlow shape attribute.
    mlir::TF::ShapeAttr ConvertTypeToTensorShapeAttr(const mlir::Type& type);
    
    // Converts an MLIR shaped type to a Tensorflow tensor spec proto.
    absl::StatusOr<TensorSpecProto> ConvertTypeToTensorSpecProto(
        const mlir::Type& type);
    
    // Converts a TensorFlow shape attribute to an MLIR shape attribute.
    absl::StatusOr<mlir::Attribute> ConvertTensorShapeProto(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  6. tensorflow/cc/experimental/libtf/runtime/runtime.cc

    using tensorflow::PartialTensorShape;
    using tensorflow::SavedConcreteFunction;
    using tensorflow::SavedObjectGraph;
    using tensorflow::Status;
    using tensorflow::StructuredValue;
    using tensorflow::TensorSpecProto;
    using tensorflow::libexport::TFPackage;
    using tensorflow::protobuf::RepeatedPtrField;
    using tensorflow::tracing::graph::GraphFunction;
    
    TaggedValue MakeCallable(const std::string& fn_name, Function fn,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 01 11:18:25 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/saved_model/core/saved_model_utils.cc

      const std::string& name = function_def->signature().name();
    
      const StructuredValue& input_signature =
          saved_concrete_function.canonicalized_input_signature();
      std::vector<const TensorSpecProto*> input_specs;
      TF_RETURN_IF_ERROR(FlattenSignature(input_signature, &input_specs));
      if (input_specs.size() + saved_concrete_function.bound_inputs_size() !=
          function_def->signature().input_arg_size()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 12 19:17:46 UTC 2023
    - 24K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc

      // Empty TensorShape indicates a scalar.
      return mlir::TF::ShapeAttr::get(type.getContext(), ArrayRef<int64_t>());
    }
    
    absl::StatusOr<TensorSpecProto> ConvertTypeToTensorSpecProto(
        const mlir::Type& type) {
      DataType dtype;
      TF_RETURN_IF_ERROR(ConvertToDataType(type, &dtype));
      TensorSpecProto tensor_spec;
      tensor_spec.set_dtype(dtype);
      *tensor_spec.mutable_shape() = ConvertTypeToTensorShape(type).AsProto();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  9. tensorflow/c/experimental/saved_model/core/revived_types/partially_revived_objects.cc

    namespace tensorflow {
    
    namespace {
    
    using StructuredValueDictEntry =
        protobuf::MapPair<std::string, StructuredValue>;
    
    using NamedParamMap =
        gtl::FlatMap<StringPiece, const TensorSpecProto*, StringPieceHasher>;
    
    Status AssertAllCreateResourceFunctionsHaveNoCaptures(
        const PartiallyRevivedObjects& objects) {
      for (const auto& id_and_resource : objects.restored_resources) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 09 20:11:48 UTC 2023
    - 23.7K bytes
    - Viewed (0)
Back to top