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')
| 1958 | |
| 1959 | |
| 1960 | def 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 | |
| 1988 | def assign_params(**kwargs): |
no test coverage detected
searching dependent graphs…