Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TF_OperationGetAttrString (0.24 sec)

  1. tensorflow/c/c_api_test.cc

      auto oper = TF_FinishOperation(desc, s_);
      ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_);
      EXPECT_TF_META("v", -1, TF_ATTR_STRING, 5);
      std::unique_ptr<char[]> value(new char[5]);
    
      TF_OperationGetAttrString(oper, "v", value.get(), 5, s_);
      EXPECT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_);
      EXPECT_EQ("bunny", string(static_cast<const char*>(value.get()), 5));
    }
    
    TEST_F(CApiAttributesTest, StringList) {
    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)
  2. tensorflow/c/c_api.h

    // point to an array of length at least `max_length` (ideally set to
    // TF_AttrMetadata.total_size from TF_OperationGetAttrMetadata(oper,
    // attr_name)).
    TF_CAPI_EXPORT extern void TF_OperationGetAttrString(TF_Operation* oper,
                                                         const char* attr_name,
                                                         void* value,
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Oct 26 21:08:15 GMT 2023
    - 82.3K bytes
    - Viewed (3)
  3. tensorflow/c/c_api.cc

        case tensorflow::AttrValue::VALUE_NOT_SET:
          status->status =
              InvalidArgument("Attribute '", attr_name, "' has no value set");
          break;
      }
      return metadata;
    }
    
    void TF_OperationGetAttrString(TF_Operation* oper, const char* attr_name,
                                   void* value, size_t max_length,
                                   TF_Status* status) {
      const auto* attr = GetAttrValue(oper, attr_name, status);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
Back to top