Questions tagged [pytorch]
Pytorch is an open source library for Tensors and Dynamic neural networks in Python with strong GPU acceleration. For details, see https://pytorch.org.
738
questions
0
votes
1
answer
17
views
Gradient output through custom loss function
I’m very new to Pytorch (and ML in general), so I’m having difficulty understanding what is going on WRT a custom loss/cost function I’m looking at. I understand what’s going on in the function, but I ...
0
votes
0
answers
13
views
GPU running out of memory for ConvLSTM model in Pytorch
I'm trying to replicate the bidirectional convolutional LSTM proposed in Xiong et al. 2017 to predict crowd count density maps, but I'm running into memory issues during the training. This is what I'...
0
votes
2
answers
22
views
LR not decaying for pytorch AdamW even after hundreds of epochs
I have following code using AdamW optimizer from pytorch:
optimizer = AdamW(params=self.model.parameters(), lr=0.00005)
I tried ...
0
votes
0
answers
8
views
Implementing pytorch temporal fusion transformer on time series
I am trying to run the temporal fusion transformer from the pytorch package. I am trying to compare the output on like terms to the tensorflow output in this paper p. 15 https://arxiv.org/pdf/1912....
2
votes
1
answer
25
views
Level of confidence for binary classification
I’m relatively new to PyTorch and deep learning. I was able to create a model and analyze a data set for both a training and test set in a binary classification problem. Everything is working well. ...
0
votes
0
answers
23
views
Mobilenetv2 transfer learning
Goal:
Transfer learning Mobilenetv2 (input size 224x224 and it's own preprocessing (resize + central_crop + normalization)) as encoder for Unet with input size 512x512 using pytorch.
What I've done:
...
0
votes
0
answers
18
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....
0
votes
1
answer
50
views
RuntimeError: Boolean value of Tensor with more than one value is ambiguous
I am trying to get boolean outputs {0,1} for my neural network. My final output is a real value e.g. r and I wanted it to be 0 if r <= 0 and be 1 if r >1. To do this, I did the following code in ...
2
votes
0
answers
22
views
Stuck with constant loss and network not learning
I am trying to predict certain function coefficients (output: a, b) based on its curve (input: frequency_response) with the help of https://github.com/Blealtan/efficient-kan (Kolmogorov-Arnold Network)...
0
votes
0
answers
9
views
How to handle sequences with crossEntropyLoss
fist of all i am ne wto the whole thing, so sorry if this is superdumb.
I'm currently training a Transformer model for a sequence classification task using CrossEntropyLoss. My input tensor has the ...
0
votes
0
answers
14
views
Unable to reproduce PyTorch model training performance
I have trained a RegNet model on a custom dataset for an image classification task. That was in August 2023. Now I want to train exactly the same model again, using the same dataset. I would expect ...
0
votes
0
answers
22
views
What is the most accurate way of computing the evaluation time of a neural network model?
I am training some neural networks in pytorch to use as an embedded surrogate model. Since I am testing various architectures, I want to compare the accuracy of each one, but I am also interested in ...
0
votes
1
answer
22
views
Why is my Transformer model outputting the same class for every token and not improving despite decreasing loss?
I'm currently training a Transformer model for a sequence classification task using CrossEntropyLoss. My input tensor has the shape (batch_size, classes, seq_len) and my target tensor has the shape (...
0
votes
1
answer
45
views
Interpretation of PPO learning curve, value loss, policy loss
my PPO training for a custom gymnasium environment resulted in following outcome. I would need some advice how to interpret the results and where to start activities to improve.
Thank you very much ...
0
votes
0
answers
14
views
How to combine Embedding layer with 3D input and 2D input in Pytorch
This familiar with my ideas.
How to use Embedding() with 3D tensor in Keras?
I'm re-implementing some table-to-text papers using RNN-based seq2seq (like this one https://arxiv.org/pdf/1603.07771v3)
...