pytorch Questions

4

I encounter this weird error when building a simple NN in Pytorch. I dont understand this error and why this consern Long and Float datatype in backward function. Anyone encounter this before? Than...
Berardo asked 4/7, 2020 at 8:6

9

I'm trying to do a basic install and import of Pytorch/Torchvision on Windows 10. I installed a Anaconda and created a new virtual environment named photo. I opened Anaconda prompt, activated the e...
Animadversion asked 28/4, 2020 at 19:57

3

I'm on Ubuntu 20.04 LTS with CUDA 11.1 installed (and working, with PATH and LD_LIBRARY_PATH configured correctly), and I'm trying to define a reusable conda environment (i.e., in an environment.ym...
Willette asked 14/9, 2021 at 15:38

3

I would like to use llama 2 7B locally on my win 11 machine with python. I have a conda venv installed with cuda and pytorch with cuda support and python 3.10. So I am ready to go. The files a here...
Hammerskjold asked 5/8, 2023 at 13:51

3

Solved

How to use tqdm for data_loader ? is this the correct way? for i,j in enumerate(data_loader,total = 100): pass
Barbarossa asked 15/8, 2020 at 13:27

5

import torchaudio When I just try to import torch audio on Pycharm, I have this error 61: UserWarning: No audio backend is available. warnings.warn('No audio backend is available.')
Militarist asked 23/6, 2020 at 21:12

5

I am working on Multiclass Classification (4 classes) for Language Task and I am using the BERT model for classification task. I am following this blog post Transfer Learning for NLP: Fine-Tuning B...

5

Relatively new to using CUDA. I keep getting the following error after a seemingly random period of time: RuntimeError: CUDA error: an illegal memory access was encountered I have seen people sugge...
Lustihood asked 23/6, 2021 at 20:7

2

I am trying to run this notebook on Apple M1 (1st gen) running MacOS 12.4, libs freeze: >pip3 freeze anyio @ file:///private/tmp/jupyterlab--anyio-20211211-70040-1yv1wmx/anyio-3.4.0 appnope==0....
Modification asked 29/5, 2022 at 5:58

2

I have a PyTorch model that generates images with high quality and speed when I run it locally. However, when I deploy the same code in a Flask server, the generated images are of much lower qualit...
Flaming asked 9/7, 2024 at 21:40

8

I was running a deep learning program on my Linux server and I suddenly got this error. UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions...
Substantiate asked 25/2, 2021 at 15:4

2

Solved

I am working on some paper replication, but I am having trouble with it. According to the log, it says that RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place o...
Sestina asked 6/9, 2022 at 5:10

4

Solved

I tried to implement an early stopping function to avoid my neural network model overfit. I'm pretty sure that the logic is fine, but for some reason, it doesn't work. I want that when the validati...

7

I want to create a random normal distribution with a given mean and std.
Thersathersites asked 2/7, 2018 at 12:46

4

Given a transformer model on huggingface, how do I find the maximum input sequence length? For example, here I want to truncate to the max_length of the model: tokenizer(examples["text"],...

5

I am trying to learn Pytorch from a book, but it seems not a straight line for me. I copied the code below and pasted in my jupyter notebook. It gave me an error that I am not able to interpret. fr...
Schumacher asked 25/3, 2022 at 13:15

2

Let's consider as an example that I have the following adjacence matrix in coordinate format: > edge_index.numpy() = array([[ 0, 1, 0, 3, 2], [ 1, 0, 3, 2, 1]], dtype=int64) which means that t...
Gudrun asked 17/4, 2020 at 15:9

5

I am trying to install torch with CUDA support. Here is the result of my collect_env.py script: PyTorch version: 1.7.1+cu101 Is debug build: False CUDA used to build PyTorch: 10.1 ROCM used to buil...
Foti asked 29/3, 2021 at 15:57

6

So, I was trying to code a chatbot using Pytorch following this tutorial. Code: (Minimal, Reproducible one) tags = [] for intent in intents['intents']: tag = intent['tag'] tags.append(tag) tags ...
Reservoir asked 27/10, 2021 at 17:16

11

Solved

I'm trying to get a basic app running with Flask + PyTorch, and host it on Heroku. However, I run into the issue that the maximum slug size is 500mb on the free version, and PyTorch itself is ~500m...
Southwards asked 7/8, 2018 at 15:50

6

I installed pytorch using conda command when the virtual env was activated. But, there are some problems when I import torch modules in Jupyter Notebook. I checked the sys.path both in the prompt...
Soursop asked 18/1, 2018 at 8:22

3

Solved

I am trying to test the hugging face's prithivida/parrot_paraphraser_on_T5 model but getting token not found error. from parrot import Parrot import torch import warnings warnings.filterwarnings(&q...
Reduplicate asked 27/11, 2022 at 20:36

8

I have done the following: !pip install pytorch_lightning -qqq import pytorch_lightning But get the following error: ImportError Traceback (most recent call last) <ipython-input-7-d883b15aac58&...
Subhuman asked 8/3, 2021 at 22:53

2

Solved

I'm trying to calculate MSELoss when mask is used. Suppose that I have tensor with batch_size of 2: [2, 33, 1] as my target, and another input tensor with the same shape. Since sequence length migh...
Captious asked 3/5, 2020 at 18:59

5

I am having hard time understanding position wise feed forward neural network in transformers architecture. Lets take example as Machine translation task, where inputs are sentences. From the figu...

© 2022 - 2025 — McMap. All rights reserved.