def load_params(self, store, key):
"""
Load the parameters from an HDFStore.
Notes:
Performs an IO operation.
Args:
store (pandas.HDFStore): the readable stream for the params.
key (str): the path for the layer params.
Returns:
None
"""
params = []
for i, ip in enumerate(self.params):
params.append(be.float_tensor(
store.get(os.path.join(key, 'parameters', 'key'+str(i))).as_matrix()
).squeeze()) # collapse trivial dimensions to a vector
self.params = self.params.__class__(*params)
评论列表
文章目录