Category "pytorch"

Deploying Huggingface model for inference - pytorch-scatter issues

It's my first time with SageMaker, and I'm having issues when trying to execute this script I took from this Huggingface model (deploy tab) from sagemaker.huggi

openAI DALL-E ModuleNotFoundError

I installed DALL-E following the instructions on and got : ---> 10 from dall_e import map_pixels, unmap_pixels, loa

Can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu()

My code in colab worked in January and now it doesn't. It's a Style Transfer program using pytorch ( Th

How to make Intel GPU available for processing through pytorch?

I'm using a laptop which has Intel Corporation HD Graphics 520. Does anyone know how to it set up for Deep Learning, specifically Pytorch? I have seen if you ha

from Model.AGCRNCell import AGCRNCell ModuleNotFoundError: No module named 'model'

I'm trying to replicate this model from here: but when I try to run the model code in my colab import torc

Not able to save model to gs bucket using

I am trying to save a PyTorch model to my google cloud bucket but it is always showing a "FileNotFoundError error". I already have a gs bucket and the file path

WeightedRandomSampler for custom image dataloader pytorch

I am trying to solve class imbalance by using Weighted Random Sampler on a custom data loader. I can't seem to find the best way to implement this. The images a

GPU memory is empty, but CUDA out of memory error occurs

During training this code with ray tune(1 gpu for 1 trial), after few hours of training (about 20 trials) CUDA out of memory error occurred from GPU:0,1. And ev

Torchtext 0.7 shows Field is being deprecated. What is the alternative?

Looks like the previous paradigm of declaring Fields, Examples and using BucketIterator is deprecated and will move to legacy in 0.8. However, I don't seem to b

How to get time taken for each layer in Pytorch?

I want to know the inference time of a layer in Alexnet. And I have a few questions about this. Is it possible to measure the inference time accurately with the

Training loss for Faster-RCNN either becoming Nan or infinity

I want to implement Pytorch Faster-RCNN module on a custom dataset that I curated and labelled. The implementation detail looks straightforward, there was a dem

No module named "Torch"

I successfully installed pytorch via conda: conda install pytorch-cpu torchvision-cpu -c pytorch I also successfully installed pytorch via pip: pip3 install ht

No module named "Torch"

I successfully installed pytorch via conda: conda install pytorch-cpu torchvision-cpu -c pytorch I also successfully installed pytorch via pip: pip3 install ht

How to do gradient clipping in pytorch?

What is the correct way to perform gradient clipping in pytorch? I have an exploding gradients problem.

How to convert road lane coordinates to tensors in Python?

I am trying to develop a Lane Detector using PyTorch. Basically, I'm reading the video frame by frame using cv2, then finding edges using Canny Edge Detector an

Mobilenet as feature backbone to use Resnet18 pretrained model using Pytorch

I have a resnet18 pretrained model, now I want to change as feature backbone into MobileNet using pytorch , please suggest any optimal way is available or not

pytorch CUDA version vs. Nvidia CUDA version

Till Apr26th, 2022, CUDA has updated to version 11.6, which can be installed by Nvidia Instruction: wget

Hugginface transformers module not recognized by anaconda

I am using Anaconda, python 3.7, windows 10. I tried to install transformers by on my env. I am aware that I must have eith

Efficiently get first N numbers that satisfy a condition in each row in a pytorch/numpy tensor

Given a tensor b, and I would like to extract N elements in each row that satisfy a specific condition. For example, suppose a is a matrix that indicates whethe

TypeError: __call__() takes 2 positional arguments but 3 were given. To train Raccoon prediction model using FastRCNN through Transfer Learning

from torchvision.models.detection.faster_rcnn import FastRCNNPredictor from engine import train_one_epoch, evaluate import utils import torchvision.transfor