These are several small changes that may be of general interest.
I realize mixing issues in a single PR is not ideal, but didn't want to separate them in case you weren't interested altogether.
Changes
Windows support
Wrapped code in if __name__ == '__main__' (needed for multiprocessing)
Removed lambdas (needed for pickling for multiprocessing)
Fixed some inconsistencies in checkpoint loading/saving
When saving, save state dict of module wrapped by nn.DataParallel, not the wrapper itself
When loading, remove module. prefix from state dict keys if nn.DataParallel wrapper was saved (the provided pretrained weights for instance)
There was some confusion about storing step or state (training loop state) in the checkpoints. Changed to whole state.
Allow separating just vocals from input mixture
Added --instruments command line argument, rather than hard coding the list.
Changed random_amplify so it doesn't assume instruments sum to mix.
These are several small changes that may be of general interest. I realize mixing issues in a single PR is not ideal, but didn't want to separate them in case you weren't interested altogether.
Changes
if __name__ == '__main__'
(needed for multiprocessing)nn.DataParallel
, not the wrapper itselfmodule.
prefix from state dict keys ifnn.DataParallel
wrapper was saved (the provided pretrained weights for instance)step
orstate
(training loop state) in the checkpoints. Changed to whole state.--instruments
command line argument, rather than hard coding the list.random_amplify
so it doesn't assume instruments sum to mix.