neuralmonkey.readers.numpy_reader module

neuralmonkey.readers.numpy_reader.from_file_list(prefix: str, suffix: str = '', default_tensor_name: str = 'arr_0') → Callable

Load a list of numpy arrays from a list of .npz numpy files.

Parameters:
  • prefix – A common prefix for the files in the list.
  • suffix – An optional suffix that will be appended to each path
  • default_tensor_name – Key of the tensors to load from the npz files.
Returns:

A generator function that yields the loaded arryas.

neuralmonkey.readers.numpy_reader.numpy_file_list_reader(files: List[str]) → Iterable[numpy.ndarray]
neuralmonkey.readers.numpy_reader.single_tensor(files: List[str]) → numpy.ndarray

Load a single tensor from a numpy file.