Conditioned-Source-Separation-LaSAFT
Conditioned-Source-Separation-LaSAFT copied to clipboard
colab error
from lasaft.source_separation.conditioned.cunet.models.dcun_tfc_gpocm_lasaft import DCUN_TFC_GPoCM_LaSAFT_Framework
args = {}
# FFT params
args['n_fft'] = 4096
args['hop_length'] = 1024
args['num_frame'] = 128
# SVS Framework
args['spec_type'] = 'complex'
args['spec_est_mode'] = 'mapping'
# Other Hyperparams
args['optimizer'] = 'adam'
args['lr'] = 0.0001
args['dev_mode'] = False
args['train_loss'] = 'spec_mse'
args['val_loss'] = 'raw_l1'
# DenseNet Hyperparams
args ['n_blocks'] = 9
args ['input_channels'] = 4
args ['internal_channels'] = 24
args ['first_conv_activation'] = 'relu'
args ['last_activation'] = 'identity'
args ['t_down_layers'] = None
args ['f_down_layers'] = None
args ['tif_init_mode'] = None
# TFC_TDF Block's Hyperparams
args['n_internal_layers'] =5
args['kernel_size_t'] = 3
args['kernel_size_f'] = 3
args['tfc_tdf_activation'] = 'relu'
args['bn_factor'] = 16
args['min_bn_units'] = 16
args['tfc_tdf_bias'] = True
args['num_tdfs'] = 6
args['dk'] = 32
args['control_vector_type'] = 'embedding'
args['control_input_dim'] = 4
args['embedding_dim'] = 64
args['condition_to'] = 'decoder'
args['control_n_layer'] = 4
args['control_type'] = 'dense'
args['pocm_type'] = 'matmul'
args['pocm_norm'] = 'batch_norm'
args['auto_lr_schedule'] = False
model = DCUN_TFC_GPoCM_LaSAFT_Framework(**args)
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-7-d966a8f14f28> in <module>()
----> 1 from lasaft.source_separation.conditioned.cunet.models.dcun_tfc_gpocm_lasaft import DCUN_TFC_GPoCM_LaSAFT_Framework
2
3 args = {}
4
5 # FFT params
10 frames
/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/apply_func.py in <module>()
23 TORCHTEXT_AVAILABLE = importlib.util.find_spec("torchtext") is not None
24 if TORCHTEXT_AVAILABLE:
---> 25 from torchtext.data import Batch
26 else:
27 Batch = type(None)
ImportError: cannot import name 'Batch' from 'torchtext.data' (/usr/local/lib/python3.7/dist-packages/torchtext/data/__init__.py)
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
I've modified my own colab notebook to avoid this kind of dependencies problem:
Work for me. Hope that help.
Thank you very much @MaxC2 !