question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DownmixMono "channels_first" kwarg is unexpected keyword

See original GitHub issue
transform = torchaudio.transforms.DownmixMono(channels_first=True)
 __init__() got an unexpected keyword argument 'channels_first'

Hash : d92de5b

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
deepwilsoncommented, Jul 22, 2019

What would be the proper method to install torchaudio on colab? @jamarshon please help.

2reactions
jamarshoncommented, Jul 22, 2019

@deepwilson I ran this on a Python3 colab and it worked. Let me know if it does 😄, although you may have to adjust the pytorch installation depending on desired Python and Cuda versions.

# Install dependencies
!apt-get install sox libsox-dev libsox-fmt-all

# Install pytorch 1.1.0 (https://pytorch.org/). Depends on Python and Cuda versions so look for correct commands
!pip3 install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp36-cp36m-linux_x86_64.whl
!pip3 install https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl

# install torchaudio
!pip install git+https://github.com/pytorch/audio.git@v0.2.0

# Run torchaudio
import torchaudio
transform = torchaudio.transforms.DownmixMono(channels_first=True)
print(transform)  # prints DownmixMono()
print(torchaudio.__version__)  # prints 0.2.0a0+7d7342f
Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: got an unexpected keyword argument
Personally I wouldn't use **kwargs for this at all, but ignoring that you can achieve what you want by composing SQL expressions:
Read more >
How does torchaudio.transforms.DownmixMono work? - audio
DownmixMono. first, I load my data with sound = torchaudio.load(). ... __init__() got an unexpected keyword argument 'channels_first'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found