def write_values(self, tensors, compress=False):
"""
write dictionary of numpy.ndarray's with Op name as key to file
Arguments:
tensors (dict): A dictionary of numpy.ndarray's with Op name as key
compress: specify whether to compress tensors
"""
if compress:
np.savez_compressed(self.name, **tensors)
else:
np.savez(self.name, **tensors)
评论列表
文章目录