raise error if training set is < 100

pull/10/head
erogol 2020-06-06 13:44:03 +02:00
parent f3209924f3
commit 1d3c0c8846
2 changed files with 2 additions and 1 deletions

View File

@ -19,7 +19,7 @@ args, unknown_args = parser.parse_known_args()
# Remove our arguments from argv so that setuptools doesn't see them
sys.argv = [sys.argv[0]] + unknown_args
version = '0.0.2'
version = '0.0.3'
# Adapted from https://github.com/pytorch/pytorch
cwd = os.path.dirname(os.path.abspath(__file__))

View File

@ -75,6 +75,7 @@ def split_dataset(items):
is_multi_speaker = len(set(speakers)) > 1
eval_split_size = 500 if len(items) * 0.01 > 500 else int(
len(items) * 0.01)
assert len(eval_split_size) > 0, " [!] You do not have enough samples to train. You need at least 100 samples."
np.random.seed(0)
np.random.shuffle(items)
if is_multi_speaker: