Category "pytorch"

How to get not normalized MNIST dataset PyTorch C++

I'm trying to follow this C++ PyTorch example but I need to load the MNIST dataset with its standard values, between 0 and 255. I removed the application of the

How to remove the last FC layer from a ResNet model in PyTorch?

I am using a ResNet152 model from PyTorch. I'd like to strip off the last FC layer from the model. Here's my code: from torchvision import datasets, transforms

Multiprocessing, file not found

I'm using AlphaPose from GitHub and I'd like to run the script script/demo_inference.py from another script I created in AlphaPose root called run.py. In run.py

ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' on matplotlib import

I'm trying to run a simple testfile on a remote Server. But it throws a numpy error for matplotlib.pyplot. Here is the code import matplotlib.pyplot as plt impo

LibTorch with OpenCV: version GOMP_5.0 not found

I'm trying to use OpenCV and LibTorch in the same project. Libtorch is installed in /usr/include/libtorch, downloaded from the PyTorch website. I'm using the cx

Is there any way I can use the downloaded pre-trained models for TIMM?

For some reason, I have to use TIMM package offline. But I found that if I use create_model(), for example: self.img_encoder = timm.create_model("swin_base_patc

can anyone explain what "out = self(images)" do in below code

I am not able to understand, if prediction is calculated in forward method, then why there is need "out = self(images)" and what it will do. I am bit confuse ab

Fine-Tuning DistilBertForSequenceClassification: Is not learning, why is loss not changing? Weights not updated?

I am relatively new to PyTorch and Huggingface-transformers and experimented with DistillBertForSequenceClassification on this Kaggle-Dataset. from transformers

OSError: [WinError 127] The specified procedure could not be found. pytorch

I get this error OSError: [WinError 127] The specified procedure could not be found. OSError Traceback (most recent call last)

Runtime Error - element 0 of tensors does not require grad and does not have a grad_fn

I am using a Unet model for semantic segmentation - I have a custom dataset of images and their masks both in .png format. I have looked in the online forums an

install torchaudio on AWS training container

What is the proper way to install torchaudio in AWS sagemaker GPU container? and why is it not pre-installed? I tried pip install torchaudio but it tries to uni

Weight tensor should be defined either for all 1000 classes or no classes but got weight tensor of shape: [5]

I'm trying to use VGG16 for ** 5 classes data set**. I've already added 5 new layers to adjust the output for logit as 5. model = models.vgg16(pretrained=True)

OSError while calling Detectron2LayoutModel

After successfully installing Layout Parser in Windows, getting the below OS Error. Code Used: model = lp.Detectron2LayoutModel(config_path="lp://PubLayNet/mask

RuntimeError: The size of tensor a (80) must match the size of tensor b (56) at non-singleton dimension 3

I ran detect.py in YOLOv5-5.0 and it shown me this. How can I fix it? Here is the problem: Traceback (most recent call last): File "F:\python_yolov5\yolov5-5.

Does Fine-tunning Bert Model in multiple times with different dataset make it more accuracy?

i'm totally new in NLP and Bert Model. What im trying to do right now is Sentiment Analysis on Twitter Trending Hashtag ("neg", "neu", "pos") by using DistilBer

Pytorch RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

This code is built up as follows: My robot takes a picture, some tf computer vision model calculates where in the picture the target object starts. This informa

Reverse Image search (for image duplicates) on local computer

I have a bunch of poor quality photos that I extracted from a pdf. Somebody I know has the good quality photo's somewhere on her computer(Mac), but it's my unde

installing box2d gym ai

I want to train DQN on CarRacing environmnet but when I want to import it using bellow command there is an error. env = gym.make('CarRacing-v0').unwrapped Attr

stylegan3 stylegan2-ada tensor mismatch error for every 256 or 512 flickr related model

Anyone having the same tensor size mismatch when trying finetuning on ffhq,ffhqu or celebahq models with stylegan3 (and with --cfg=stylegan2)? With afhqv2 and

Indexing in two dimensional PyTorch Tensor using another Tensor

Suppose that tensor A is defined as: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 I'm trying to extract a flat array out of this matrix by using another t