Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for AsProtoField (0.46 sec)

  1. tensorflow/c/c_api_test.cc

      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 =
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
Back to top