Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for SetAttrType (0.41 sec)

  1. tensorflow/c/eager/c_api_unified_experimental.cc

    }
    
    void TF_AbstractOpSetAttrType(TF_AbstractOp* op, const char* const attr_name,
                                  TF_DataType value, TF_Status* s) {
      Status status =
          unwrap(op)->SetAttrType(attr_name, static_cast<DataType>(value));
      TF_SetStatus(s, static_cast<TF_Code>(status.code()),
                   tsl::NullTerminatedMessage(status));
    }
    
    void TF_ExecuteOperation(TF_AbstractOp* op, int num_inputs,
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 9K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. tensorflow/c/eager/gradients.cc

      forward_op_->attrs.Set(attr_name, value);
      return op_->SetAttrBool(attr_name, value);
    }
    Status SetAttrType(AbstractOperation* op_, const char* attr_name,
                       DataType value, ForwardOperation* forward_op_) {
      forward_op_->attrs.Set(attr_name, value);
      return op_->SetAttrType(attr_name, value);
    }
    Status SetAttrShape(AbstractOperation* op_, const char* attr_name,
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  5. 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)
  6. tensorflow/c/experimental/gradients/tape/tape_operation.cc

      forward_op_.attrs.Set(attr_name, value);
      return parent_op_->SetAttrBool(attr_name, value);
    }
    Status TapeOperation::SetAttrType(const char* attr_name, DataType value) {
      forward_op_.attrs.Set(attr_name, value);
      return parent_op_->SetAttrType(attr_name, value);
    }
    Status TapeOperation::SetAttrShape(const char* attr_name, const int64_t* dims,
                                       const int num_dims) {
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jun 07 01:53:35 GMT 2022
    - 9K bytes
    - Viewed (1)
  7. tensorflow/c/eager/c_api_unified_experimental_graph.cc

        return absl::OkStatus();
      }
      Status SetAttrBool(const char* attr_name, bool value) override {
        op_->node_builder.Attr(attr_name, value);
        return absl::OkStatus();
      }
      Status SetAttrType(const char* const attr_name, DataType value) override {
        if (!op_) {
          return Status(
              absl::StatusCode::kFailedPrecondition,
              "op_type and op_name must be specified before specifying attrs.");
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 15.4K bytes
    - Viewed (1)
  8. 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)
  9. tensorflow/c/eager/c_api.cc

      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()) {
        LOG(WARNING) << "Unable to set attribute: " << attr_name;
      }
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
  10. 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)
Back to top