MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / get_tensor

Method get_tensor

python/paddle/hapi/model.py:406–408  ·  view source on GitHub ↗
(var)

Source from the content-addressed store, hash-verified

404 pickle.dump(state, f)
405
406 def get_tensor(var):
407 t = global_scope().find_var(var.name).get_tensor()
408 return np.array(t)
409
410 base = os.path.basename(path)
411 assert base != "", "path should be of 'dirname/filename' format"

Callers 15

_build_saved_state_dictFunction · 0.45
_lod_tensor2varbaseFunction · 0.45
_save_selected_rowsFunction · 0.45
_save_binary_varFunction · 0.45
loadFunction · 0.45
set_valueFunction · 0.45
get_valueFunction · 0.45
to_dlpackFunction · 0.45
deserialize_persistablesFunction · 0.45
load_varsFunction · 0.45
get_tensorFunction · 0.45
set_varFunction · 0.45

Calls 1

global_scopeFunction · 0.90

Tested by

no test coverage detected