MCPcopy
hub / github.com/tensorlayer/TensorLayer / load_npz

Function load_npz

tensorlayer/files/utils.py:1960–1985  ·  view source on GitHub ↗

Load the parameters of a Model saved by tl.files.save_npz(). Parameters ---------- path : str Folder path to `.npz` file. name : str The name of the `.npz` file. Returns -------- list of array A list of parameters in order. Examples ----

(path='', name='model.npz')

Source from the content-addressed store, hash-verified

1958
1959
1960def load_npz(path='', name='model.npz'):
1961 """Load the parameters of a Model saved by tl.files.save_npz().
1962
1963 Parameters
1964 ----------
1965 path : str
1966 Folder path to `.npz` file.
1967 name : str
1968 The name of the `.npz` file.
1969
1970 Returns
1971 --------
1972 list of array
1973 A list of parameters in order.
1974
1975 Examples
1976 --------
1977 - See ``tl.files.save_npz``
1978
1979 References
1980 ----------
1981 - `Saving dictionary using numpy <http://stackoverflow.com/questions/22315595/saving-dictionary-of-header-information-using-numpy-savez>`__
1982
1983 """
1984 d = np.load(os.path.join(path, name), allow_pickle=True)
1985 return d['params']
1986
1987
1988def assign_params(**kwargs):

Callers 4

restore_paramsFunction · 0.90
restore_paramsFunction · 0.90
load_and_assign_npzFunction · 0.85
npz_to_W_pdfFunction · 0.85

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…