Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for TF_SetAttrType (0.2 sec)

  1. tensorflow/c/c_test_util.cc

                           TF_DataType dtype, const std::vector<int64_t>& dims,
                           TF_Operation** op) {
      TF_OperationDescription* desc = TF_NewOperation(graph, "Placeholder", name);
      TF_SetAttrType(desc, "dtype", dtype);
      if (!dims.empty()) {
        TF_SetAttrShape(desc, "shape", dims.data(), dims.size());
      }
      *op = TF_FinishOperation(desc, s);
      ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  2. tensorflow/c/eager/parallel_device/parallel_device_test.cc

      TF_SetAttrType(placeholder_desc, "dtype", TF_FLOAT);
      TF_Operation* placeholder_op = TF_FinishOperation(placeholder_desc, status);
      if (TF_GetCode(status) != TF_OK) return;
      TF_Output x{placeholder_op, 0};
    
      TF_OperationDescription* reduce_desc =
          TF_NewOperation(body.get(), "CollectiveReduce", "CollectiveReduce");
      TF_SetAttrType(reduce_desc, "T", TF_FLOAT);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 08 23:47:35 GMT 2021
    - 29.3K bytes
    - Viewed (1)
  3. tensorflow/c/eager/c_api_experimental_test.cc

          TF_NewOperation(function_graph, "Placeholder", "arg");
      TF_SetAttrType(arg_descr, "dtype", TF_INT32);
      TF_Status* status = TF_NewStatus();
      TF_Operation* arg = TF_FinishOperation(arg_descr, status);
      ASSERT_TRUE(TF_GetCode(status) == TF_OK) << TF_Message(status);
      TF_OperationDescription* id_descr =
          TF_NewOperation(function_graph, "Identity", "id");
      TF_SetAttrType(id_descr, "T", TF_INT32);
      TF_AddInput(id_descr, {arg, 0});
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 03:14:26 GMT 2023
    - 31.5K bytes
    - Viewed (1)
  4. tensorflow/c/c_api_test.cc

        TF_OperationDescription* desc = TF_NewOperation(graph, "Const", name);
        TF_SetAttrTensor(desc, "value", tensor.get(), s);
        if (TF_GetCode(s) != TF_OK) return nullptr;
        TF_SetAttrType(desc, "dtype", TF_FLOAT);
        TF_Operation* op = TF_FinishOperation(desc, s);
        EXPECT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
        return op;
      }
    
    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)
  5. tensorflow/c/c_api.cc

      for (int i = 0; i < num_values; ++i) {
        b[i] = values[i];
      }
      desc->node_builder.Attr(attr_name,
                              ArraySlice<const bool>(b.get(), num_values));
    }
    
    void TF_SetAttrType(TF_OperationDescription* desc, const char* attr_name,
                        TF_DataType value) {
      desc->node_builder.Attr(attr_name, static_cast<DataType>(value));
    }
    
    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)
  6. tensorflow/c/c_api_function_test.cc

                            const char* attr_name, const char* attr_value,
                            TF_Operation** op) {
      TF_OperationDescription* desc = TF_NewOperation(graph, "Placeholder", name);
      TF_SetAttrType(desc, "dtype", TF_INT32);
      TF_SetAttrString(desc, attr_name, attr_value, strlen(attr_value));
      *op = TF_FinishOperation(desc, s);
      ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
      ASSERT_NE(*op, nullptr);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 20 22:08:54 GMT 2023
    - 63.6K bytes
    - Viewed (6)
  7. tensorflow/c/c_api.h

                                                  const unsigned char* values,
                                                  int num_values);
    TF_CAPI_EXPORT extern void TF_SetAttrType(TF_OperationDescription* desc,
                                              const char* attr_name,
                                              TF_DataType 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)
Back to top