Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for SetAttrInt (0.22 sec)

  1. tensorflow/c/experimental/gradients/tape/tape_operation.h

      Status Execute(absl::Span<AbstractTensorHandle*> retvals,
                     int* num_retvals) override;
      Status SetAttrString(const char* attr_name, const char* data,
                           size_t length) override;
      Status SetAttrInt(const char* attr_name, int64_t value) override;
      Status SetAttrFloat(const char* attr_name, float value) override;
      Status SetAttrBool(const char* attr_name, bool value) override;
    C
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 23 23:12:39 GMT 2020
    - 3.7K bytes
    - Viewed (1)
  2. tensorflow/c/experimental/gradients/tape/tape_operation.cc

      forward_op_.attrs.Set(attr_name, StringPiece(data, length));
      return parent_op_->SetAttrString(attr_name, data, length);
    }
    Status TapeOperation::SetAttrInt(const char* attr_name, int64_t value) {
      forward_op_.attrs.Set(attr_name, static_cast<int64_t>(value));
      return parent_op_->SetAttrInt(attr_name, value);
    }
    Status TapeOperation::SetAttrFloat(const char* attr_name, float value) {
      forward_op_.attrs.Set(attr_name, value);
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jun 07 01:53:35 GMT 2022
    - 9K bytes
    - Viewed (1)
  3. tensorflow/c/eager/gradients_internal.h

    // Sets the attrs in the `ForwardOperation`.
    Status SetAttrString(AbstractOperation*, const char* attr_name,
                         const char* data, size_t length, ForwardOperation*);
    Status SetAttrInt(AbstractOperation*, const char* attr_name, int64_t value,
                      ForwardOperation*);
    Status SetAttrFloat(AbstractOperation*, const char* attr_name, float value,
                        ForwardOperation*);
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Oct 24 11:27:35 GMT 2021
    - 4.2K bytes
    - Viewed (0)
  4. tensorflow/c/eager/abstract_operation.h

                             int* num_retvals) = 0;
    
      virtual Status SetAttrString(const char* attr_name, const char* data,
                                   size_t length) = 0;
      virtual Status SetAttrInt(const char* attr_name, int64_t value) = 0;
      virtual Status SetAttrFloat(const char* attr_name, float value) = 0;
      virtual Status SetAttrBool(const char* attr_name, bool value) = 0;
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Jul 14 16:20:41 GMT 2021
    - 6.8K bytes
    - Viewed (0)
  5. tensorflow/c/eager/parallel_device/parallel_device_test.cc

      TF_OperationDescription* reduce_desc =
          TF_NewOperation(body.get(), "CollectiveReduce", "CollectiveReduce");
      TF_SetAttrType(reduce_desc, "T", TF_FLOAT);
      TF_SetAttrInt(reduce_desc, "group_size", group_size);
      TF_SetAttrInt(reduce_desc, "group_key", 0);
      TF_SetAttrInt(reduce_desc, "instance_key", 0);
    
      const std::string merge_op("Mul");
      TF_SetAttrString(reduce_desc, "merge_op", merge_op.c_str(),
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 08 23:47:35 GMT 2021
    - 29.3K bytes
    - Viewed (1)
  6. tensorflow/c/eager/gradients.cc

      return op_->SetAttrString(attr_name, data, length);
    }
    Status SetAttrInt(AbstractOperation* op_, const char* attr_name, int64_t value,
                      ForwardOperation* forward_op_) {
      forward_op_->attrs.Set(attr_name, static_cast<int64_t>(value));
      return op_->SetAttrInt(attr_name, value);
    }
    Status SetAttrFloat(AbstractOperation* op_, const char* attr_name, float value,
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api_unified_experimental_graph.cc

                           size_t length) override {
        tensorflow::StringPiece s(data, length);
        op_->node_builder.Attr(attr_name, s);
        return absl::OkStatus();
      }
      Status SetAttrInt(const char* attr_name, int64_t value) override {
        op_->node_builder.Attr(attr_name, static_cast<int64_t>(value));
        return absl::OkStatus();
      }
      Status SetAttrFloat(const char* attr_name, float value) override {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 15.4K bytes
    - Viewed (1)
  8. tensorflow/c/c_test_util.cc

          0, graph, s, ::tensorflow::strings::StrCat(name, "_const0").c_str());
      TF_OperationDescription* desc = TF_NewOperation(graph, "Split", name);
      TF_AddInput(desc, {zero, 0});
      TF_AddInput(desc, {input, 0});
      TF_SetAttrInt(desc, "num_split", 3);
      TF_SetAttrType(desc, "T", TF_INT32);
      // Set device to CPU since there is no version of split for int32 on GPU
      // TODO(iga): Convert all these helpers and tests to use floats because
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  9. tensorflow/c/eager/c_api.cc

      if (!s.ok()) {
        LOG(WARNING) << "Unable to set attribute: " << attr_name;
      }
    }
    
    void TFE_OpSetAttrInt(TFE_Op* op, const char* attr_name, int64_t value) {
      auto s = tensorflow::unwrap(op)->SetAttrInt(attr_name, value);
      if (!s.ok()) {
        LOG(WARNING) << "Unable to set attribute: " << attr_name;
      }
    }
    
    void TFE_OpSetAttrFloat(TFE_Op* op, const char* attr_name, float value) {
    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/c_api_test.cc

        EXPECT_EQ(list[i], string(static_cast<const char*>(values[i]), lens[i]))
            << i;
      }
    }
    
    TEST_F(CApiAttributesTest, Int) {
      auto desc = init("int");
      TF_SetAttrInt(desc, "v", 31415);
    
      auto oper = TF_FinishOperation(desc, s_);
      ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_);
      EXPECT_TF_META("v", -1, TF_ATTR_INT, -1);
    
      int64_t value;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
Back to top