- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for MakeCleanup (0.25 sec)
-
tensorflow/c/experimental/filesystem/plugins/gcs/cleanup.h
limitations under the License. ==============================================================================*/ // MakeCleanup(f) returns an RAII cleanup object that calls 'f' in its // destructor. The easiest way to use MakeCleanup is with a lambda argument, // capturing the return value in an 'auto' local variable. Most users will not // need more sophisticated syntax than that. // // Example:
C - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Thu Jul 09 11:16:00 GMT 2020 - 3.4K bytes - Viewed (0) -
tensorflow/c/eager/custom_device_test.cc
TFE_Execute(op.get(), &var_handle, &num_retvals, status.get()); ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get()); ASSERT_TRUE(executed); auto handle_cleaner = tensorflow::gtl::MakeCleanup( [var_handle]() { TFE_DeleteTensorHandle(var_handle); }); // Assign to the variable, copying to the custom device. std::unique_ptr<TFE_TensorHandle, decltype(&TFE_DeleteTensorHandle)> one(
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) -
tensorflow/c/eager/tape.h
Status s = InitialGradients(vspace, target_tensor_ids, sources_that_are_targets, output_gradients, tensor_tape_, state.op_tape, &gradients); auto cleanup = gtl::MakeCleanup([this, &state]() { if (!persistent_) { // Release all backprop functions for (const auto& pair : state.op_tape) { pair.second.backward_function_deleter(pair.second.backward_function); }
C - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Tue Apr 02 12:40:29 GMT 2024 - 47.2K bytes - Viewed (1) -
tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc
const std::shared_ptr<Block>& block, TF_Status* status) { bool downloaded_block = false; auto reconcile_state = MakeCleanup([this, &downloaded_block, &key, &block] { // Perform this action in a cleanup callback to avoid locking mu_ after // locking block->mu. if (downloaded_block) { absl::MutexLock l(&mu_);
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Thu Jul 16 01:39:09 GMT 2020 - 11.1K bytes - Viewed (0)