Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colab error #18

Open
molo32 opened this issue Apr 27, 2021 · 2 comments
Open

colab error #18

molo32 opened this issue Apr 27, 2021 · 2 comments

Comments

@molo32
Copy link

molo32 commented Apr 27, 2021

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.
---------------------------------------------------------------------------
@ws-choi ws-choi added good first issue Good for newcomers help wanted Extra attention is needed labels May 3, 2021
@ghost
Copy link

ghost commented May 5, 2021

I've modified my own colab notebook to avoid this kind of dependencies problem:

Google Colab Notebook

Work for me. Hope that help.

@ws-choi ws-choi removed good first issue Good for newcomers help wanted Extra attention is needed labels May 5, 2021
@ws-choi
Copy link
Owner

ws-choi commented May 5, 2021

Thank you very much @MaxC2 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants