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.

LightWeightConv layer warnings during training

See original GitHub issue

If just install specified requirements + Pillow and fairseq following warnings appear during training start:

No module named 'lightconv_cuda'

If install lightconv-layer from fairseq, the folllowing warning displayed:

WARNING: Unsupported filter length passed - skipping forward pass

Pytorch 1.7 Cuda 10.2 Fairseq 1.0.0a0+19793a7

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ghostcommented, Jun 4, 2021

@KinamSalad lightconv_cuda is not a package. It is a pytorch extension write in C++. The shitty thing is fairseq don’t automatically install it when you build fairseq(and I don’t see and guiding or warning about installing it either) so you have to build it yourself. You can install it by following steps:

  1. Installing fairseq from source https://github.com/pytorch/fairseq
  2. Go to the folder https://github.com/pytorch/fairseq/tree/master/fairseq/modules/lightconv_layer
  3. Create lightconv_cuda_foward.cu and lightconv_cuda_backward.cu by: python cuda_function_gen.py
  4. Install lightconv_layer by: python setup.py install

Note: This installation depend a lot on cuda env so.

  • You have to install cuda from Nvidia runtime file or deb file. https://developer.nvidia.com/cuda-downloads
  • If you install cudatookit from pip it will not work(cudatoolkit package is not full cuda installation)
  • If you are in cloud(GCP in my case) you should not use ready build image with cuda. Because they don’t install cuda in normal fashion so the code can’t find environment variable they need. In my case they prompt $CUDA_HOME variable not found and I can’t find where cuda is installed either.
  • I verified it with cuda 11 and torch 1.7, 1.8 on GCP.
0reactions
v-nhandt21commented, Jun 23, 2022

@GuangChen2016 I did not install fairseq, LightweightConv of LEECHOONGHO script worked for me except the soft-DTW of Parallel Tacotron2

ps: The softDTW in this repo can not work with large batch-size. You can check the appendix of this paper, may it help: https://arxiv.org/pdf/2205.04421.pdf

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementation of Lightweight Convolutional Neural Networks ...
The lightweight CNN can be obtained by training this reconstructed CNN. Figure 1 shows one convolutional layer (left) in the original CNN ...
Read more >
Driver Behaviors Recognizer Based on Light-Weight ...
This research introduces a light-weight convolutional neural network architecture to recognize driver behaviors, helping the warning system ...
Read more >
Large-Truck Safety Warning System Based on Lightweight ...
This paper presents a lightweight SSD model based on atrous convolution. It is used in large-truck safety warning systems. On the basis of...
Read more >
Lightweight convolutional neural network for aircraft small ...
It can automatically identify aircraft in airport images and assist tower controllers in ensuring flight safety. It is essential in daily ...
Read more >
A Lightweight Multi-Scale Convolutional Neural Network for ...
A Lightweight Multi-Scale Convolutional Neural Network for P300 Decoding: Analysis of Training Strategies and Uncovering of Network Decision.
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