Skip to content

Which torch version to get? #45

@Flesco

Description

@Flesco

Hi, some people have reported that putting torch==0.4.1 in the requirements works for them. For me this produces this error:

/content/samplernn-pytorch/model.py:60: UserWarning: nn.init.kaiming_uniform is now deprecated in favor of nn.init.kaiming_uniform_. init.kaiming_uniform(self.input_expand.weight) /content/samplernn-pytorch/model.py:61: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_. init.constant(self.input_expand.bias, 0) /content/samplernn-pytorch/nn.py:48: UserWarning: nn.init.uniform is now deprecated in favor of nn.init.uniform_. nn.init.uniform(tensor, -math.sqrt(3 / fan_in), math.sqrt(3 / fan_in)) /content/samplernn-pytorch/model.py:76: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_. init.constant(getattr(self.rnn, 'bias_ih_l{}'.format(i)), 0) /content/samplernn-pytorch/nn.py:62: UserWarning: nn.init.orthogonal is now deprecated in favor of nn.init.orthogonal_. init(chunk) /content/samplernn-pytorch/model.py:82: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_. init.constant(getattr(self.rnn, 'bias_hh_l{}'.format(i)), 0) /content/samplernn-pytorch/nn.py:31: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_. nn.init.constant(self.bias, 0) /content/samplernn-pytorch/model.py:90: UserWarning: nn.init.uniform is now deprecated in favor of nn.init.uniform_. self.upsampling.conv_t.weight, -np.sqrt(6 / dim), np.sqrt(6 / dim) /content/samplernn-pytorch/model.py:92: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_. init.constant(self.upsampling.bias, 0) /content/samplernn-pytorch/model.py:141: UserWarning: nn.init.kaiming_uniform is now deprecated in favor of nn.init.kaiming_uniform_. init.kaiming_uniform(self.input.weight) /content/samplernn-pytorch/model.py:150: UserWarning: nn.init.kaiming_uniform is now deprecated in favor of nn.init.kaiming_uniform_. init.kaiming_uniform(self.hidden.weight) /content/samplernn-pytorch/model.py:151: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_. init.constant(self.hidden.bias, 0) /content/samplernn-pytorch/model.py:161: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_. init.constant(self.output.bias, 0) Traceback (most recent call last): File "train.py", line 360, in <module> main(**vars(parser.parse_args())) File "train.py", line 258, in main trainer.run(params['epoch_limit']) File "/content/samplernn-pytorch/trainer/__init__.py", line 56, in run self.train() File "/content/samplernn-pytorch/trainer/__init__.py", line 61, in train enumerate(self.dataset, self.iterations + 1): File "/content/samplernn-pytorch/dataset.py", line 51, in __iter__ for batch in super().__iter__(): File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 314, in __next__ batch = self.collate_fn([self.dataset[i] for i in indices]) File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 314, in <listcomp> batch = self.collate_fn([self.dataset[i] for i in indices]) File "/content/samplernn-pytorch/dataset.py", line 34, in __getitem__ torch.from_numpy(seq), self.q_levels RuntimeError: PyTorch was compiled without NumPy support

I'm using this Colab notebook btw: https://drive.google.com/file/d/13tVz73FXyG8Xvidl-SqyxNtBwozAlvth/view?usp=sharing

Any help would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions