Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 66 for tensorproto (0.26 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/quantization_options.proto

      // an option in the TF Quantizer in StableHLO Quantizer v1.
      STABLEHLO = 4;
    }
    
    // The data format of each sample in the representative dataset.
    message RepresentativeDataSample {
      map<string, TensorProto> tensor_proto_inputs = 2;
    }
    
    // Specifies the type and path to the representative dataset.
    // NEXT ID: 2
    message RepresentativeDatasetFile {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 19 06:31:19 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  2. tensorflow/c/tf_tensor.cc

      for (int i = 0; i < num_new_dims; ++i) {
        TF_RETURN_IF_ERROR(s.AddDimWithStatus(new_dims[i]));
      }
      return tensor_.BitcastFrom(from.tensor_, type, s);
    }
    
    Status TensorInterface::FromProto(const tensorflow::TensorProto& from) {
      bool success = tensor_.FromProto(from);
      if (success) return absl::OkStatus();
      return errors::InvalidArgument("Unparseable tensor proto");
    }
    
    }  // namespace tensorflow
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/shape_inference.cc

              const_def.set_name(
                  graph->NewName(absl::StrCat("var_shape_", var_node->name())));
              DataType dtype = n->output_type(0);
              AddNodeAttr("dtype", dtype, &const_def);
              TensorProto value;
              value.set_dtype(dtype);
              value.mutable_tensor_shape()->add_dim()->set_size(
                  shape_proto.dim_size());
              for (const auto& dim : shape_proto.dim()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 00:41:19 UTC 2024
    - 13K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/increase_dynamism_for_auto_jit_pass.cc

    template <class T>
    using StatusOrOptional = StatusOr<std::optional<T>>;
    
    StatusOrOptional<Tensor> TryToGetTensorFromConstOp(Node* n) {
      if (n->type_string() != "Const") {
        return {std::nullopt};
      }
    
      const TensorProto* proto = nullptr;
      TF_RETURN_IF_ERROR(GetNodeAttr(n->def(), "value", &proto));
      Tensor tensor(proto->dtype());
      TF_RET_CHECK(tensor.FromProto(*proto));
      return {tensor};
    }
    
    struct SliceInputs {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

                                                   /*get_storage=*/true));
      auto value_type = mlir::dyn_cast<mlir::RankedTensorType>(type);
    
      tensorflow::TensorProto repr = tfl::ConvertTfliteConstTensor(tensor, buffer);
      repr.clear_tensor_shape();
      if (tfl::IsQuantized(tensor)) {
        repr.mutable_tensor_shape()->add_dim()->set_size(buffer.size());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/extract_outside_compilation_pass_test.cc

      {
        std::unique_ptr<Graph> g(new Graph(&fld));
    
        tensorflow::TensorProto tensor_proto;
        tensor_proto.set_dtype(tensorflow::DT_INT32);
        tensorflow::TensorShapeProto shape;
        shape.add_dim()->set_size(2);
        *tensor_proto.mutable_tensor_shape() = shape;
        for (int i = 0; i < 2; ++i) {
          tensor_proto.add_int_val(1);
        }
        NodeDef const_def;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 41K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/deadness_analysis.cc

            BaseType(node->output_type(tensor_id.index())) == DT_BOOL;
        TF_RET_CHECK(!must_be_true || is_boolean_tensor);
    
        if (node->type_string() == "Const" && must_be_true) {
          const TensorProto* proto = nullptr;
          TF_RETURN_IF_ERROR(GetNodeAttr(node->def(), "value", &proto));
    
          Tensor tensor(proto->dtype());
          TF_RET_CHECK(tensor.FromProto(*proto));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 60.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

          // TODO(b/225793355): It adds TensorProtoAttr to the constant as a
          // workaround.
          tensorflow::TensorProto tensor_proto;
          if (!mlir::tfg::ConvertToTensorProto(
                   mlir::cast<ElementsAttr>(tensor_proto_attr), &tensor_proto)
                   .ok()) {
            return failure();
          }
    
          const int bit_width =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/translate/import_model.cc

      return llvm::StringRef(*saved_strings_.insert(s).first);
    }
    
    // Extracts a TensorProto for a Const op from a GraphDef, given an op_name.
    // Returns nullptr on not found or other mismatch.
    // This returns a pointer to the actual node within the graph_def so as to
    // avoid expensive copies.
    const TensorProto* ExtractConstTensorFromGraph(const GraphDef& graph_def,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 183.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/encapsulate_subgraphs_pass.cc

                             const std::vector<ControlFlowInfo>& control_flow_info,
                             const TensorShapeProto& shape, Graph* graph_out) {
      DataType data_type = src_node->output_type(src_port);
      TensorProto dummy_proto;
      dummy_proto.set_dtype(data_type);
      *dummy_proto.mutable_tensor_shape() = shape;
      // Don't set any value field in the proto, since it is only going to be used
      // for shape inference.
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 51K bytes
    - Viewed (0)
Back to top