Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for TFE_OpSetAttrType (0.43 sec)

  1. tensorflow/c/eager/c_api_test_util.cc

      TFE_OpAddInput(op, axis, status);
      CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      TFE_OpSetAttrBool(op, "keep_dims", 1);
      TFE_OpSetAttrType(op, "Tidx", TF_INT32);
      TF_DeleteStatus(status);
      TFE_OpSetAttrType(op, "T", TFE_TensorHandleDataType(input));
    
      return op;
    }
    
    TFE_Op* AllReduceOp(TFE_Context* ctx, TFE_TensorHandle* in, int group_size) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 23.5K bytes
    - Viewed (2)
  2. tensorflow/c/eager/custom_device_test.cc

      std::unique_ptr<TFE_Op, decltype(&TFE_DeleteOp)> op(
          TFE_NewOp(context.get(), "VarHandleOp", status.get()), TFE_DeleteOp);
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      TFE_OpSetAttrType(op.get(), "dtype", TF_FLOAT);
      TFE_OpSetAttrShape(op.get(), "shape", {}, 0, status.get());
      TFE_OpSetAttrString(op.get(), "container", "", 0);
      TFE_OpSetAttrString(op.get(), "shared_name", "", 0);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Aug 27 23:39:24 GMT 2020
    - 18.4K bytes
    - Viewed (0)
  3. tensorflow/c/c_api_experimental_test.cc

      TFE_Op* reshape_op = TFE_NewOp(tfe_context_, "Reshape", status_);
      CHECK_EQ(TF_OK, TF_GetCode(status_)) << TF_Message(status_);
      TFE_OpSetAttrType(reshape_op, "T", TF_FLOAT);
      TFE_OpSetAttrType(reshape_op, "Tshape", TF_INT32);
      CheckOutputShapes(reshape_op,
                        /* input_shapes*/ {unknown_shape(), unknown_shape()},
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Jan 17 22:27:52 GMT 2023
    - 13.1K bytes
    - Viewed (1)
  4. tensorflow/c/eager/parallel_device/parallel_device_lib_test.cc

      std::unique_ptr<TFE_Op, decltype(&TFE_DeleteOp)> handle_op(
          TFE_NewOp(context.get(), "VarHandleOp", status.get()), TFE_DeleteOp);
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      TFE_OpSetAttrType(handle_op.get(), "dtype", TF_FLOAT);
      TFE_OpSetAttrShape(handle_op.get(), "shape", /*dims=*/nullptr, /*num_dims=*/0,
                         status.get());
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 08 23:47:35 GMT 2021
    - 15.3K bytes
    - Viewed (0)
  5. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

      std::unique_ptr<TFE_Op, decltype(&TFE_DeleteOp)> op(
          TFE_NewOp(context, "VarHandleOp", status), TFE_DeleteOp);
      if (TF_GetCode(status) != TF_OK) return nullptr;
      TFE_OpSetAttrType(op.get(), "dtype", type);
      TFE_OpSetAttrShape(op.get(), "shape", dims, num_dims, status);
      TFE_OpSetAttrString(op.get(), "container", "", 0);
      // Use the special GUID for no buffer sharing
      //
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Jun 15 15:44:44 GMT 2021
    - 12.5K bytes
    - Viewed (0)
  6. tensorflow/c/eager/c_api_test.cc

      TFE_DeleteContextOptions(opts);
    
      TFE_Op* var_op = TFE_NewOp(ctx, "VarHandleOp", status);
      TFE_OpSetAttrType(var_op, "dtype", TF_INT64);
      TFE_OpSetAttrShape(var_op, "shape", {}, 0, status);
      const TFE_OpAttrs* attributes = TFE_OpGetAttrs(var_op);
    
      TFE_Op* copy_op = TFE_NewOp(ctx, "VarHandleOp", status);
      TFE_OpSetAttrType(copy_op, "dtype", TF_FLOAT);
      TFE_OpAddAttrs(copy_op, attributes);
      unsigned char is_list = 0;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 20:50:20 GMT 2023
    - 94.6K bytes
    - Viewed (1)
  7. tensorflow/c/eager/parallel_device/parallel_device_lib.h

                        status);
        if (TF_GetCode(status) != TF_OK) return nullptr;
        TFE_OpSetAttrTensor(const_op.get(), "value", tensor.get(), status);
        if (TF_GetCode(status) != TF_OK) return nullptr;
        TFE_OpSetAttrType(const_op.get(), "dtype", datatype_enum);
        TFE_TensorHandle* device_handle;
        int num_outputs = 1;
        TFE_Execute(const_op.get(), &device_handle, &num_outputs, status);
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Apr 25 15:21:13 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  8. tensorflow/c/eager/c_api_cluster_test.cc

                      TFE_TensorHandle** out_value) {
      TF_Status* status = TF_NewStatus();
      TFE_Op* op = TFE_NewOp(ctx, "ReadVariableOp", status);
      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      TFE_OpSetAttrType(op, "dtype", TF_FLOAT);
      TFE_OpAddInput(op, var, status);
      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      int num_retvals = 1;
      TFE_Execute(op, out_value, &num_retvals, status);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Apr 14 10:03:59 GMT 2023
    - 19.3K bytes
    - Viewed (0)
  9. tensorflow/c/eager/c_api.cc

                                                   (value == 0) ? false : true);
      if (!s.ok()) {
        LOG(WARNING) << "Unable to set attribute: " << attr_name;
      }
    }
    
    void TFE_OpSetAttrType(TFE_Op* op, const char* attr_name, TF_DataType value) {
      auto s = tensorflow::unwrap(op)->SetAttrType(
          attr_name, static_cast<tensorflow::DataType>(value));
      if (!s.ok()) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
  10. tensorflow/c/eager/c_api.h

    TF_CAPI_EXPORT extern void TFE_OpSetAttrBool(TFE_Op* op, const char* attr_name,
                                                 unsigned char value);
    TF_CAPI_EXPORT extern void TFE_OpSetAttrType(TFE_Op* op, const char* attr_name,
                                                 TF_DataType value);
    // If the number of dimensions is unknown, `num_dims` must be set to
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Apr 27 21:07:00 GMT 2023
    - 22.8K bytes
    - Viewed (1)
Back to top