def setNetwork(self, fname, nEpoch=-1):
""" Set values into the network
Parameters
-----------
fname : string
Name of the file where the values are
nEpoch : int
Epoch number (Optional)
"""
basename = "nnets/" + fname
if (nEpoch>=0):
all_params = joblib.load(basename + ".epoch={}".format(nEpoch))
else:
all_params = joblib.load(basename)
self._network.setAllParams(all_params)
评论列表
文章目录