Skip to content

Commit

Permalink
batch size must be greater than 1 for contrastive learning
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Feb 8, 2023
1 parent 6d45461 commit 0d1f2b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions musiclm_pytorch/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ def __init__(
accelerate_kwargs: dict = dict()
):
super().__init__()
assert batch_size > 1, 'batch size must be greater than 1 for contrastive learning (but ideally as large as possible)'

self.accelerator = Accelerator(**accelerate_kwargs)

self.mulan = mulan
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'musiclm-pytorch',
packages = find_packages(exclude=[]),
version = '0.0.15',
version = '0.0.16',
license='MIT',
description = 'MusicLM - AudioLM + Audio CLIP to text to music synthesis',
author = 'Phil Wang',
Expand Down

0 comments on commit 0d1f2b3

Please sign in to comment.