All Questions
Tagged with pytorch classification
22 questions
0
votes
0
answers
15
views
My network to classify dialects is not working
I have written the following code to classify dialects based on the timit dataset using .wav files. For some reason my model is not learning and classifies everything into the same class. Is it ...
0
votes
0
answers
28
views
Cross entropy loss for multi classification problem
I am handling a multi-class classification problem, with label in the following form [1333201000]
and the logit output of the model is in the form
([[ 0.4523, 0.0198, -0.1911, -0.0036],
[ 0.4917, 0....
1
vote
1
answer
44
views
Unordered Set Classification Problem
In my setup I have one feature which is a sparse list representing categories. For example, let's say that we have M categories in the interval ...
0
votes
0
answers
17
views
Training the neural network does not give the expected result
I'm trying to create a pytorch neural network capable of recognizing peaks in 2D graphs. Previously, I was able to get a result close to what I wanted, but it was not ideal and did not give a ...
0
votes
0
answers
10
views
Relationship among different classifiers of a model in multiclass problems
Suppose we are fitting a LogisticRegression model with scikit-learn, or the same model with pytorch. In multiclass problems, the strategy OneVsRest will fit a different classifier for each of the ...
0
votes
1
answer
410
views
Correlation between multiple time series
For research, we put some test samples through a physical process for a certain period of time and make measurements. The general structure of the data we collect is as follows:
...
0
votes
0
answers
881
views
How can I improve the accuracy of my pytorch neural network for classification of tabular data?
As a newbie in 'pytorch', I am building a neural network for classification of faulty water pumps in Tazania for this competition I am also using ax-platform for ...
3
votes
1
answer
121
views
Solving video classification problem by taking EVA Large as backbone
I am solving a video classification problem. There are 9 classes in total. At first I took ResNet as a feature extractor, this gave me 0.74 accuracy. Then I changed ResNet to EVA (I also tried Swin), ...
0
votes
0
answers
189
views
training loss decreases but training accuracy is also decreasing with epochs
I am working on the classification problem where by I am having a hinge loss function + other loss terms to optimize for which the input is the output from tanh layer at the end. But I can't reveal ...
1
vote
0
answers
519
views
Why do we use squeeze(1) at this model definition with PyTorch?
PyTorch noobie here. I'm following an online tutorial and there's a simple model definition as follows:
...
1
vote
0
answers
24
views
Classifying data that seems non linear
The data I am using specifies a series Cartesian coordinates, and velocities and there will be solutions that are fairly closely plotted for all of these... however it also utilizes rotations and the ...
1
vote
1
answer
21
views
Checking trained CNN on the images
I trained my CNN (model) classifier and want to check it on some new images. I have image x, so this syntax works for me for one image:
torch.argmax(model(x))
What ...
0
votes
2
answers
3k
views
Loading pretrained model with Pytorch
I saved my model with this code:
from google.colab import files
torch.save(net, 'model.pth')
# download checkpoint file
files.download('model.pth')
Then uploaded ...
0
votes
1
answer
75
views
Understanding PyTorch's BCE Notation
According to the PyTorch documentation for the Binary Cross Entropy Loss, we can write it as follows:
$$l_{n} = -w_{n}\cdot \left[y_{n}\cdot \log \left(x_{n}\right) + \left( 1-y_{n}\right)\cdot \log\...
0
votes
1
answer
214
views
Target and output shape/type for binary classification using PyTorch
so I have some annotated images that I want to use to train a binary image classifier but I have been having issues creating the dataset and actually getting a test model to train. Each image is ...
1
vote
1
answer
338
views
How to properly set up neural network training for stable accuracy and loss
I have a DenseNet121 implemented in Pytorch for image classification. For now, the training set-up is pretty straightforward:
the data is loaded. An important characteristic here is that the ...
0
votes
1
answer
420
views
How to pass input to deep learning models for Multiple choice question answering problem?
I'm currently working on a multiple-choice question answering system. The training set consists of a question, answer and 4 options and I need to predict the correct answer among 4 options. Sometimes ...
0
votes
0
answers
1k
views
Binary cross entropy loss for one hot encoded 2 class problem
My aim is to predict whether a person is alive or dead. In the case there are two classes which can either be alive (1) or dead (0). The output could be only one class i.e 1 or 0 and not multi label ...
3
votes
2
answers
505
views
Loss function for age classification
I am building a CNN model for age classification. Assuming age of a person is between 1-100, my last Linear Layer contains 100 output neuron.
Now i want to find an appropriate loss function for this ...
1
vote
2
answers
105
views
Classification with a lot of the classes
I’m trying to make model which will classify text into about 500 different classes. I think that I have to customize architecture of the Pooling Classifier which looks now like this:
...
1
vote
0
answers
125
views
What’s more appropriate for outlier detection? Classification or Regression?
I'm using PyTorch and i’m working on a data set where I only care about “outliers” from the norm. The data is comprised of long time series with gaussian distribution, while once in a while there is a ...
1
vote
0
answers
482
views
Global average polling without fc layer, Vanishing gradient or other problem?
I have built this network with pytorch, it's basically a modification of VGG16, I add some layers and remove some. The output of the network are meant to be softmax scores for F.multilabel-soft-margin-...