Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 66 for tensorproto (0.35 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/mangling_util.cc

    Status DemangleShape(absl::string_view str, TensorShapeProto* proto) {
      return ParseTextProto(str, kTensorShapePrefix, proto);
    }
    
    string MangleTensor(const TensorProto& tensor) {
      return absl::StrCat(kTensorPrefix, PrintShortTextProto(tensor));
    }
    
    Status DemangleTensor(absl::string_view str, TensorProto* proto) {
      return ParseTextProto(str, kTensorPrefix, proto);
    }
    
    string MangleDataType(const DataType& dtype) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. tensorflow/cc/framework/cc_op_gen_util.cc

        strings::StrAppend(&ret, shape.dim_size(d));
      }
      strings::StrAppend(&ret, "}");
      return ret;
    }
    
    string PrintTensor(const TensorProto& tensor_proto) {
      Tensor t(tensor_proto.dtype());
      CHECK(t.FromProto(tensor_proto));
      const int64_t num_elts = t.NumElements();
      switch (t.dtype()) {
        case DT_FLOAT:
          return PrintArray(num_elts, t.flat<float>().data());
        case DT_DOUBLE:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 00:57:05 UTC 2024
    - 25K bytes
    - Viewed (0)
  3. tensorflow/cc/framework/ops.h

          typedef T type;
        };
        // END_SKIP_DOXYGEN
    
        TensorProto AsTensorProto() {
          TensorProto tensor_proto;
          if (tensor.NumElements() > 1) {
            tensor.AsProtoTensorContent(&tensor_proto);
          } else {
            tensor.AsProtoField(&tensor_proto);
          }
          return tensor_proto;
        }
    
        Status status;
        Tensor tensor;
      };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 05:57:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc

    }
    
    TEST(ConvertTensorProtoTest, SplatTensor) {
      // We construct a sparse TensorProto representing 2^35 float elements, all of
      // them 42. Our conversion routine should not materialize these elements when
      // creating the Attribute. If it tries to, we'll crash OOM here.
      TensorProto tensor;
      tensor.set_dtype(DT_FLOAT);
      tensor.mutable_tensor_shape()->add_dim()->set_size(1ULL << 35);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/saved_model/core/saved_model_utils.h

    namespace tensorflow {
    namespace internal {
    
    // Load a TensorProto into a tensorflow::Constant. This is similar to the
    // constant loading logic in python:
    // https://github.com/tensorflow/tensorflow/blob/516608035f85cec8b126712b0ff8407220206b22/tensorflow/python/saved_model/load.py#L437
    Status TensorProtoToConstant(ImmediateExecutionContext* ctx,
                                 const TensorProto& proto,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 13 04:18:52 UTC 2022
    - 5.7K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/saved_model/core/saved_model_utils.cc

        return errors::FailedPrecondition("Unable to find Const operation '",
                                          const_op_name, "'s value attribute");
      }
      const TensorProto& tensor_proto = attr_name_and_value->second.tensor();
      return internal::TensorProtoToConstant(ctx, tensor_proto, output);
    }
    
    // Perform some basic sanity checks on SavedConcreteFunction's input and
    // output signatures with respect to the corresponding FunctionDef's input
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 12 19:17:46 UTC 2023
    - 24K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/debugging/dump_tensor_op.cc

        if (!enabled_) return;
    
        const Tensor& tensor_data = ctx->input(0);
    
        TensorProto tensor_proto;
        tensor_data.AsProtoTensorContent(&tensor_proto);
    
        OP_REQUIRES_OK(ctx, tensor_data_writer_->WriteRecord(
                                tensor_proto.SerializeAsString()));
      }
    
     private:
      bool enabled_;
      std::unique_ptr<tsl::WritableFile> tensor_data_file_;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 03:12:17 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  8. tensorflow/cc/ops/const_op.h

    namespace tensorflow {
    namespace ops {
    
    /// @defgroup const_op Const Op
    /// @{
    
    Output Const(const Scope& scope, const Input::Initializer& val);
    
    Output ConstFromProto(const Scope& scope, const TensorProto& proto);
    
    NodeBuilder::NodeOut AsNodeOut(const Scope& scope, const Input& inp);
    
    template <typename T>
    Output Const(const Scope& scope, const Input::Initializer& val) {
      auto orig_const_output = Const(scope, val);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 17 09:17:01 UTC 2020
    - 2.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/utils/tf_type_utils.cc

        const llvm::StringRef mangled_tensor_proto, TensorType tensor_type) {
      ::tensorflow::TensorProto tensor_proto;
      absl::Status status = ::tensorflow::mangling_util::DemangleTensor(
          mangled_tensor_proto, &tensor_proto);
      if (!status.ok()) {
        return failure();
      }
    
      ::tensorflow::Tensor t;
      if (!t.FromProto(tensor_proto)) {
        return failure();
      }
    
      if (t.dtype() == ::tensorflow::DT_QINT8) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/utils/const_tensor_utils.h

        bool truncate = false);
    
    absl::StatusOr<mlir::ElementsAttr> ConvertFloatBuffer(
        mlir::RankedTensorType shaped_type, const std::vector<uint8_t>& buffer);
    
    tensorflow::TensorProto ConvertTfliteConstTensor(
        const tflite::TensorT& tensor, const std::vector<uint8_t>& buffer);
    
    }  // namespace TFL
    }  // namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top