def _nn_filename(name, epoch):
    """Gets the filename for the trained weights."""
    if epoch is None:
        return "pretrain/{:s}.npz".format(name)
    else:
        return "pretrain/{:s}-epoch{:04d}.npz".format(name, epoch)