Skip to main content

All Questions

-1 votes
1 answer
337 views

loading Yolov9 model trained on custom dataset: AttributeError: 'str' object has no attribute 'shape'

I have trained a yolov9 model on custom dataset for instance segmentation, now I want to get segmentation area after segmentation. An output like the given below image but for each and every object ...
Plutus's user avatar
  • 43
1 vote
0 answers
75 views

How to use Torchvison Mixup with a Multilabel Problem?

I want to use MixUp as a data augmentation for a multilabel image classification problem, but it only seems to support labels with the shape (batch_size,). How do I modify this to allow for labels ...
will's user avatar
  • 11
0 votes
0 answers
37 views

Why is there a small difference between gradients calculated using torch autograd vs functorch?

I am using this linked solution from a previous question to compute gradients more efficiently than a manual loop. I notice that there is some small difference in the gradients calculated using the ...
Seraf Fej's user avatar
  • 271
1 vote
0 answers
234 views

tqdm print average information in the end of the loop

During the run tqdm print current information of the unit (in my case batch) like accuracy and loss. Is there an elegant way that after last iteration tqdm print in the same line the average accuracy/...
ChaosPredictor's user avatar
0 votes
1 answer
72 views

How to solve a Custom Optimisation problem which uses Matrix Factorisation and custom loss in Pytorch?

I am trying to replicate the paper Recommendation for Effective Standardized Exam Preparation where they have used a special term called correctness probability function and is described as: ...
Deshwal's user avatar
  • 4,232
1 vote
0 answers
405 views

How should BCELoss relate to accuracy?

I'm running a feedforward classifier neural network in PyTorch, in what should be a really simple test case to provide a baseline against which to evaluate more complex techniques, and puzzled by an ...
rwallace's user avatar
  • 33.7k
-1 votes
1 answer
924 views

why pytorch is not installing on windows 11 on python 3.11

I am trying to install pytorch on Windows 11 for quite some time now. I have upgraded pip and everything can someone help me with it? python version 3.11.1 64 bit installed I tried upgrading pip I ...
Muhammad Uzair's user avatar
0 votes
1 answer
969 views

How to create LSTM that allows dynamic sequence length in PyTorch

I've created an LSTM in PyTorch and I need to give it a sequence length variable, the following is my code: class Seq2SeqSingle(nn.Module): def __init__(self, input_size, hidden_size, num_layers, ...
Francesco Scala's user avatar
0 votes
1 answer
1k views

PyTorch Dataloader for multiple files with sliding window

I am working on a problem where I have multiple CSVs files and I need to read those multiple CSVs one by one with a sliding window. Let’s assume that, one CSV file is having 330 data points and the ...
Pythonic's user avatar
3 votes
0 answers
4k views

No NVIDIA GPU found error, even though I defined Torch to use CPU

UPDATE: I have edited and changed more code, now I dont get an error and it either works but taked hours, or it is stuck on step one I have tried running Stable Diffusion, the new text2image model. ...
Louid's user avatar
  • 33
0 votes
1 answer
534 views

Streamlit crashes while importing torch

Im trying to load my model and make an app using streamlit but the app crashes while importing torch. Does anyone know the reason?
Ronnie ASA's user avatar
1 vote
0 answers
1k views

Is torchmetrics mean average precision behaving as expected? 2 images assessed individually score higher than the result together

I'm trying to evaluate the performance of an object detection model using torchmetrics mean average precision. However, I'm getting this odd result: When I evaluate the metric for image A, I get 'map':...
Lydia's user avatar
  • 11
0 votes
1 answer
155 views

Pytorch error mat1 and mat2 shapes cannot be multiplied in Autoencoder to compress images

I receive this error. Whereas the size of my input image is 3x120x120, so I flatten the image by the following code, however, I received this error: mat1 and mat2 shapes cannot be multiplied (720x120 ...
Andrea's user avatar
  • 3
-1 votes
1 answer
743 views

Is there any way to read .pth(dataset) and turn them into csv?

I have a repo that provided a model architecture, but not pretrained model. it actually provides a .pth file but it's dataset inside the file, is there any way to make the dataset to csv?
acedone's user avatar
1 vote
1 answer
3k views

how to convert .pth.tar file to a .pt?

I have a .pth.tar file how can I read in that file and then save it to the same directory in a .pt file? I am using the modelzoo mlnf file which I cannot find its .pt equivalent. https://kaiyangzhou....
jack gell's user avatar
  • 195

15 30 50 per page