Category "pytorch"

Why DETR need to set a empty class?

Why DETR need to set a empty class? It has set a "Background" class, which means non-object, why?

Pytorch CUDA error: no kernel image is available for execution on the device on RTX 3090 with cuda 11.1

If I run the following: import torch import sys print('A', sys.version) print('B', torch.__version__) print('C', torch.cuda.is_available()) print('D', torch.bac

Is there any way to increase the size during memory sharing between process in PyTorch

My current code is like this: import torch import torch.multiprocessing as mp t = torch.zeros([10,10]) t.share_memory_() processes = [] for i in range(3):

How to change activation layer in Pytorch pretrained module?

How to change the activation layer of a Pytorch pretrained network? Here is my code : print("All modules") for child in net.children(): if isinstance(chi

any script to test the installation of Pytorch

I have installed the pytorch, and would like to check are there any script to test whether the installation is correct, e.g., whether it can enable CUDA or not,

ValueError: Target size (torch.Size([16])) must be the same as input size (torch.Size([16, 1]))

ValueError Traceback (most recent call last) <ipython-input-30-33821ccddf5f> in <module> 23 output = mod

load_from_checkpoint fails after transfer learning a LightningModule

I try to transfer learn a LightningModule. The relevant part of the code is this: class DeepFilteringTransferLearning(pl.LightningModule): def __init__(self

Embedding 3D data in Pytorch

I want to implement character-level embedding. This is usual word embedding. Word Embedding Input: [ [‘who’, ‘is’, ‘this&rsquo

RuntimeError: CUDA out of memory with FastAPI

I try to make a backend server based on fastapi. My backend server works well with almost no errors, but I found an error situation. I allocate two services to

How should the output of my embedding layer look? Keras to PyTorch

I am in the process of translating a Keras implementation to a PyTorch one. After the full conversion my model was not converging fast enough, although the loss

Why detach needs to be called on variable in this example?

I was going through this example - https://github.com/pytorch/examples/blob/master/dcgan/main.py and I have a basic question. fake = netG(noise) label = Variab

How to save information about the result of instance segmentation by YOLACT?

Is there any way to save the detected categories, their number, MASK area, etc. to a TXT file or CSV file when performing instance segmentation using YOLACT? I&

Fine Tuning Pretrained Model MobileNet_V2 in Pytorch

I am new to pyTorch and I am trying to Create a Classifier where I have around 10 kinds of Images Folder Dataset, for this task I am using Pretrained model( Mob

Get the polygon coordinates of predicted output mask in YOLACT/YOLACT++

I am using Yolact https://github.com/dbolya/yolact ,an instance segmentation algorithm which outputs the test image with a mask on the detected object. As the i

How to calculate unbalanced weights for BCEWithLogitsLoss in pytorch

I am trying to solve one multilabel problem with 270 labels and i have converted target labels into one hot encoded form. I am using BCEWithLogitsLoss(). Since

Use of pytorch dataset for model inference- GPU

I am running T5-base-grammar-correction for grammer correction on my dataframe with text column from happytransformer import HappyTextToText from happytransform

what's the difference between "self-attention mechanism" and "full-connection" layer?

I am confused with these two structures. In theory, the output of them are all connected to their input. what magic make 'self-attention mechanism' is more powe

PyTorch - RuntimeError: [enforce fail at inline_container.cc:209] . file not found: archive/data.pkl

Problem I'm trying to load a file using PyTorch, but the error states archive/data.pkl does not exist. Code import torch cachefile = 'cacheddata.pth' torch.load

Pytorch tensor to PIL image with alpha channel

Using fastai v1, I have a model that transforms an image. When I plot the resulting image with matplotlib, the background is white; ax.imshow(image2np(img.data)

How to create a copy of nn.Sequential in torch?

I am trying to create a copy of a nn.Sequential network. For example, the following is the easiest way to do the same- net = nn.Sequential( nn.Conv2d(16