- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for GetVariableFromSession (1.27 sec)
-
tensorflow/compiler/mlir/tensorflow/utils/session_utils.h
// refers to which is in 'device_name' device. If failed to fetch the value null // will be returned. // Note, caller is responsible for Unref the variable. tensorflow::Var* GetVariableFromSession(mlir::TF::VarHandleOp var_handle_op, llvm::StringRef device_name, const tensorflow::DeviceMgr* mgr);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 06 04:50:13 UTC 2023 - 2.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/session_utils.cc
std::vector<std::string> names; names.reserve(var_handle_ops.size()); for (auto var_handle_op : var_handle_ops) names.push_back(GetVariableName(var_handle_op)); return names; } tensorflow::Var* GetVariableFromSession(mlir::TF::VarHandleOp var_handle_op, llvm::StringRef device_name, const tensorflow::DeviceMgr* mgr) { tensorflow::Device* device = nullptr;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/mark_initialized_variables.cc
llvm::StringRef device_name, const tensorflow::DeviceMgr* mgr, tensorflow::Session* session) { auto* var_ptr = GetVariableFromSession(var_handle_op, device_name, mgr); if (!var_ptr) return false; auto* tensor = var_ptr->tensor(); bool is_initialized = tensor && tensor->IsInitialized(); var_ptr->Unref(); return is_initialized; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 13 19:14:56 UTC 2023 - 4.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/initialize_variables_in_session_init.cc
InitializeVariable(var_op, &resource_tensor, session_init_func, builder); continue; } auto handle = resource_tensor.scalar<tensorflow::ResourceHandle>()(); auto* var_ptr = GetVariableFromSession(var_op, handle.device(), mgr); if (!var_ptr) { // If no value in session, then just skip this variable. // This can happen if the variable is not saved in checkpoint.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 23 09:05:47 UTC 2024 - 7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc
return GetTensorValueAsElementsAttr(resource_tensor, builder); } auto handle = resource_tensor.scalar<tensorflow::ResourceHandle>()(); auto* var_ptr = tf_saved_model::GetVariableFromSession(var_handle_op, handle.device(), mgr); if (!var_ptr) { return nullptr; } tensorflow::core::RefCountPtr<tensorflow::Var> var(var_ptr);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 09:56:53 UTC 2024 - 19.4K bytes - Viewed (0)