- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for Unref (0.14 sec)
-
tensorflow/c/experimental/gradients/nn_grad.cc
&grad_inputs[0], name.c_str())); return absl::OkStatus(); } ~ReluGradientFunction() override { for (auto output : forward_outputs_) { if (output) { output->Unref(); } } } private: // TODO(b/174778737): Only hold needed outputs. vector<AbstractTensorHandle*> forward_outputs_; }; Status BroadcastMul(AbstractContext* ctx, AbstractTensorHandle* vec,
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 5.7K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental.cc
return wrap((unwrap(c)->CreateOperation())); } void TF_DeleteAbstractOp(TF_AbstractOp* op) { unwrap(op)->Release(); } void TF_DeleteAbstractTensor(TF_AbstractTensor* t) { unwrap(t)->Unref(); } TF_OutputList* TF_NewOutputList() { return wrap(new OutputList); } void TF_DeleteOutputList(TF_OutputList* o) { delete unwrap(o); } void TF_OutputListSetNumOutputs(TF_OutputList* o, int num_outputs,
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 9K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/custom_gradient_test.cc
/*sources=*/inputs, /*output_gradients=*/{}, /*result=*/outputs)); exp_output->Unref(); return absl::OkStatus(); } TEST_P(CustomGradientTest, ExpWithPassThroughGrad) { std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status( TF_NewStatus(), TF_DeleteStatus); AbstractContextPtr ctx;
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 4.8K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/grad_test_helper.cc
ASSERT_NEAR(dnumerical[j], danalytical[j], abs_error); } TF_DeleteTensor(analytical_tensor); TF_DeleteTensor(numerical_tensor); delete[] danalytical; delete[] dnumerical; outputs[i]->Unref(); } } void CheckTensorValue(AbstractTensorHandle* t, absl::Span<const float> manuals, absl::Span<const int64_t> dims, double abs_error) { TF_Tensor* analytical_tensor;
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 5K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/math_grad_test.cc
ASSERT_NO_FATAL_FAILURE(CheckTensorValue(outputs[1], dB_vals[i], /*dims*/ {3, 3}, /*abs_error*/ 0)); outputs[0]->Unref(); outputs[1]->Unref(); } } TEST_P(CppGradients, TestSqrtGrad) { AbstractTensorHandlePtr x; { AbstractTensorHandle* x_raw = nullptr; status_ = TestScalarTensorHandle<float, TF_FLOAT>(
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Thu Apr 13 17:32:14 GMT 2023 - 16.3K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/array_grad_test.cc
// Although, `ops::IdentityN` returns 2 tensors, the first tensor isn't needed // for computing gradient so we could safely drop it. outputs[0] = temp_outputs[1]; temp_outputs[0]->Unref(); return absl::OkStatus(); } class CppGradients : public ::testing::TestWithParam<std::tuple<const char*, bool, bool>> { protected: void SetUp() override { TF_StatusPtr status(TF_NewStatus());
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 5K bytes - Viewed (0) -
tensorflow/c/eager/gradients.cc
TapeTensor::TapeTensor(AbstractTensorHandle* handle) : handle_(handle) { handle_->Ref(); } TapeTensor::TapeTensor(const TapeTensor& other) { handle_ = other.handle_; handle_->Ref(); } TapeTensor::~TapeTensor() { handle_->Unref(); } int64_t TapeTensor::GetID() const { return ToId(handle_); } tensorflow::DataType TapeTensor::GetDType() const { return handle_->DataType(); }
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) -
tensorflow/c/experimental/gradients/tape/tape_context.cc
// TODO(srbs): Make AbstractContext ref counted. // parent_ctx_->Ref(); } void TapeContext::Release() { // TODO(srbs): Change to Unref() delete this; } TapeContext::~TapeContext() { // TODO(srbs): Make AbstractContext ref counted. // parent_ctx_->Unref(); } TapeOperation* TapeContext::CreateOperation() { return new TapeOperation(parent_ctx_->CreateOperation(), tape_, registry_); }
C++ - Registered: Tue Feb 27 12:39:08 GMT 2024 - Last Modified: Wed Sep 23 23:12:39 GMT 2020 - 1.7K bytes - Viewed (0) -
tensorflow/c/eager/dlpack.cc
return tensor; } // Deleter for DLManagedTensor void DLManagedTensorDeleter(DLManagedTensor* arg) { TfDlManagedTensorCtx* owner = static_cast<TfDlManagedTensorCtx*>(arg->manager_ctx); owner->reference.Unref(); delete owner; } // Converts TF_DATAType to DLPack data type. DLDataType GetDlDataType(TF_DataType data_type, TF_Status* status) { DLDataType dtype; dtype.lanes = 1;
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 12.8K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/math_grad.cc
return absl::OkStatus(); } ~DivNoNanGradientFunction() override { for (auto input : forward_inputs_) { if (input) { input->Unref(); } } for (auto output : forward_outputs_) { if (output) { output->Unref(); } } } private: // TODO(b/174778737): Only hold needed inputs and outputs. vector<AbstractTensorHandle*> forward_inputs_;
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 15.2K bytes - Viewed (0)