- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for Unref (0.13 sec)
-
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/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/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/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/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/eager/unified_api_testutil.cc
TF_RETURN_IF_ERROR(model(func_ctx.get(), absl::MakeSpan(func_inputs), absl::MakeSpan(model_outputs))); for (auto func_input : func_inputs) { func_input->Unref(); } AbstractFunction* func = nullptr; OutputList output_list; output_list.expected_num_outputs = 0; output_list.outputs.reserve(outputs.size());
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Feb 27 13:57:45 GMT 2024 - 5.7K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/tape/tape_operation.cc
// parent_op_->Ref(); } void TapeOperation::Release() { // TODO(srbs): Change to Unref(). delete this; } TapeOperation::~TapeOperation() { // TODO(b/172003047): Consider making AbstractOperation RefCounted. // parent_op->Unref(); } Status TapeOperation::Reset(const char* op, const char* raw_device_name) { forward_op_.op_name = op; forward_op_.attrs.Reset(op);
C++ - Registered: Tue Feb 27 12:39:08 GMT 2024 - Last Modified: Tue Jun 07 01:53:35 GMT 2022 - 9K bytes - Viewed (1) -
tensorflow/c/experimental/gradients/nn_grad_test.cc
// Although, `ops::SparseSoftmaxCrossEntropyWithLogits` returns 2 tensors, the // second tensor isn't needed for computing gradient so we could safely drop // it. outputs[0] = loss; backprop->Unref(); return absl::OkStatus(); } Status BiasAddModel(AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, absl::Span<AbstractTensorHandle*> outputs) {
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 8.3K bytes - Viewed (0) -
tensorflow/c/eager/abstract_tensor_handle.h
private: const AbstractTensorHandleKind kind_; }; namespace internal { struct AbstractTensorHandleDeleter { void operator()(AbstractTensorHandle* p) const { if (p != nullptr) { p->Unref(); } } }; } // namespace internal // TODO(b/185908092): Make AbstractTensorHandlePtr an IntrusivePtr. using AbstractTensorHandlePtr = std::unique_ptr<AbstractTensorHandle,
C - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Fri Mar 03 00:30:36 GMT 2023 - 3K bytes - Viewed (0)