Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for tensorproto (0.14 sec)

  1. tensorflow/c/kernels_test.cc

          tensor_proto.mutable_tensor_shape()->add_dim()->set_size(2);
          tensor_proto.mutable_tensor_shape()->add_dim()->set_size(3);
          tensor_proto.set_dtype(DT_FLOAT);
          tensor_proto.add_float_val(5.0f);
          tensor_proto.add_float_val(6.0f);
          tensor_proto.add_float_val(7.0f);
          tensor_proto.add_float_val(8.0f);
          tensor_proto.add_float_val(9.0f);
          tensor_proto.add_float_val(10.0f);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 50.4K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. tensorflow/compiler/jit/mark_for_compilation_pass.cc

        if (!e->IsControlEdge() && e->src()->IsConstant()) {
          const_input = e->src();
          break;
        }
      }
    
      if (!const_input) {
        return false;
      }
    
      const TensorProto* proto = nullptr;
      if (!TryGetNodeAttr(const_input->def(), "value", &proto)) {
        return false;
      }
    
      return TensorShapeUtils::IsScalar(proto->tensor_shape());
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 12:19:41 UTC 2024
    - 85.3K bytes
    - Viewed (0)
  7. tensorflow/c/c_api.h

    // TF_Version returns a string describing version information of the
    // TensorFlow library. TensorFlow uses semantic versioning.
    TF_CAPI_EXPORT extern const char* TF_Version(void);
    
    // Parsing a serialized TensorProto into a TF_Tensor.
    TF_CAPI_EXPORT extern void TF_TensorFromProto(const TF_Buffer* from,
                                                  TF_Tensor* to, TF_Status* status);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Oct 26 21:08:15 UTC 2023
    - 82.3K bytes
    - Viewed (0)
  8. tensorflow/c/c_api_test.cc

      TF_DeleteTensor(a);
      TF_DeleteTensor(b);
    }
    
    TEST(CAPI, TestFromProto) {
      Tensor t_cc(DT_FLOAT, TensorShape({2, 3}));
      t_cc.flat<float>().setConstant(1.0);
      tensorflow::TensorProto t_proto;
      t_cc.AsProtoField(&t_proto);
    
      TF_Buffer* t_buffer = TF_NewBuffer();
      TF_CHECK_OK(MessageToBuffer(t_proto, t_buffer));
    
      const int num_bytes = 6 * sizeof(float);
      float* values =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 96.9K bytes
    - Viewed (0)
Back to top