Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for mutable_tensor_shape (0.23 sec)

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

        // Attribute for that proto, and finally splat the Attribute.
    
        TensorProto tensor_copy = input_tensor;
        auto* shape = tensor_copy.mutable_tensor_shape();
        shape->clear_dim();
        shape->add_dim()->set_size(1);
    
        TF_ASSIGN_OR_RETURN(ElementsAttr single_attr,
                            ConvertTensorProto(tensor_copy, builder));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc

      // 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);
      tensor.add_float_val(42.0);
    
      mlir::MLIRContext context;
      mlir::Builder builder(&context);
      TF_ASSERT_OK_AND_ASSIGN(mlir::ElementsAttr attribute,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/shape_inference.cc

              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()) {
                if (dtype == DT_INT32) {
                  value.add_int_val(dim.size());
    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/mlir/lite/utils/const_tensor_utils.cc

        const TensorT& tensor, const std::vector<uint8_t>& buffer) {
      tensorflow::TensorProto ret;
      ret.set_dtype(TflTypeToTfType(tensor.type));
    
      tensorflow::TensorShapeProto* shape = ret.mutable_tensor_shape();
      shape->set_unknown_rank(false);
      for (auto dim : tensor.shape) {
        shape->add_dim()->set_size(int64_t{dim});
      }
      // TensorFlow Lite uses tflite::DynamicBufer to encode vector of strings.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/extract_outside_compilation_pass_test.cc

        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;
        TF_CHECK_OK(NodeDefBuilder("const", "Const")
                        .Attr("dtype", DT_INT32)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 41K bytes
    - Viewed (0)
Back to top