- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for destroy_resource_ (0.22 sec)
-
tensorflow/c/experimental/saved_model/core/revived_types/restored_resource.cc
// did not have their destroy_resource function saved, meaning they will // leak resources. // // Check that handle is null before calling destroy_resource function in case // destructor is invoked unintentionally. if (destroy_resource_ != nullptr && handle() != nullptr) { Status status = ExecuteNoArgDummyReturnFunction(destroy_resource_); if (!status.ok()) { LOG(WARNING)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 14 19:16:58 UTC 2023 - 3.1K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/revived_types/restored_resource.h
// initialize - Non owning pointer to the initialize function associated with // this object. Must be NON-NULL. // destroy_resource - Non owning pointer to the destroy_resource function // associated with this object. Ideally this should be // NON-NULL, but in order to support models saved prior to
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 23 04:49:47 UTC 2020 - 4.6K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/revived_types/partially_revived_objects.cc
} } TFConcreteFunction* destroy_resource = nullptr; if (resource_revival_state.destroy_resource != nullptr) { destroy_resource = revived->concrete_functions.Find( resource_revival_state.destroy_resource->node_id); if (destroy_resource == nullptr) { return absl::FailedPreconditionError(absl::StrCat( "'destroy_resource' function with node id ",
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 09 20:11:48 UTC 2023 - 23.7K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/revived_types/restored_resource_revival_state.h
struct RestoredResourceRevivalState { std::string device; TFConcreteFunctionRevivalState* create_resource = nullptr; TFConcreteFunctionRevivalState* initialize = nullptr; TFConcreteFunctionRevivalState* destroy_resource = nullptr; ImmediateTensorHandlePtr resource_handle = nullptr; }; } // namespace tensorflow
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 23 04:49:47 UTC 2020 - 1.7K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/saved_model_utils.cc
resource.initialize = &objects->concrete_functions[child_node_id]; } else if (child.local_name() == "_destroy_resource" && obj_graph.nodes(child.node_id()).kind_case() == SavedObject::kFunction) { resource.destroy_resource = &objects->concrete_functions[child_node_id]; } } } objects->signatures_map = std::move(signatures_map);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jan 12 19:17:46 UTC 2023 - 24K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/ops/variable_ops.h
// the cleanup that occurs in a tf.Variable's EagerResourceDeleter: // https://github.com/tensorflow/tensorflow/blob/516608035f85cec8b126712b0ff8407220206b22/tensorflow/python/ops/resource_variable_ops.py#L289-L290 Status DestroyResource(ImmediateExecutionContext* ctx, ImmediateExecutionTensorHandle* handle); } // namespace internal } // namespace tensorflow
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Aug 30 21:44:45 UTC 2022 - 3.2K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/ops/variable_ops.cc
return errors::Internal("Unexpected tensor handle kind."); } output->reset( reinterpret_cast<ImmediateExecutionTensorHandle*>(owned_value.release())); return Status(); } Status DestroyResource(ImmediateExecutionContext* ctx, ImmediateExecutionTensorHandle* handle) { ImmediateOpPtr destroy_op(ctx->CreateOperation()); TF_RETURN_IF_ERROR(destroy_op->Reset("DestroyResourceOp", nullptr));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 23 11:28:19 UTC 2024 - 5K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/ops/variable_ops_test.cc
ImmediateTensorHandlePtr handle; TF_EXPECT_OK(internal::CreateUninitializedResourceVariable( context(), DT_FLOAT, {}, nullptr, &handle)); // Destroy the variable TF_EXPECT_OK(internal::DestroyResource(context(), handle.get())); } // Sanity check for handle assignment and reading TEST_F(VariableOpsTest, AssignVariableAndReadSuccessful) { // Create a DT_Resource TensorHandle that points to a scalar DT_FLOAT tensor
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Aug 21 19:26:54 UTC 2020 - 3.8K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/revived_types/variable.cc
Variable::~Variable() { // If the handle is null (perhaps because variable was std::moved from), then // we don't have to do anything. if (handle_ == nullptr) { return; } Status status = internal::DestroyResource(ctx_, handle_.get()); if (!status.ok()) { LOG(ERROR) << "Error destroying variable: " << name_ << "due to: " << status; } } DataType Variable::dtype() { return dtype_; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Oct 08 20:55:40 UTC 2020 - 4.4K bytes - Viewed (0)