All Questions
Tagged with neural-network pytorch
137
questions
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
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 ...
1
vote
1
answer
55
views
wierd neural network approache
I'm working on a problem where I need to create a neural network to optimize the seating arrangement for 24 unique individuals in a 6x4 grid, minimizing conflicts between adjacent (up,down,left,right) ...
6
votes
1
answer
180
views
Changing output size from a model
So I am currently training some deep learning models for some basic classification problems, and I am trying to figure out if it is possible to change the output size of the model in case I want to ...
0
votes
0
answers
61
views
diffusion model: can't overfit on single batch
I am training the diffusion model from diffusion policy, specifically their vision notebook, on a custom dataset. As always, I try to make a sanity check of the pipeline, by overfitting on a single ...
0
votes
0
answers
9
views
pytorch is_leaf problem
I have a problem about is_leaf of the rotation_matrix i defined below in picture 1.Picture 2 shows how do i get rotation[i] by using getattr to get it from model_params. Picture 3 shows how do i use ...
1
vote
1
answer
34
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 ...
1
vote
1
answer
50
views
Does using different optimizer change the loss landscape
I plot the landscape using this code, and I notice the landscape shape has changed a lot. My understanding is that the optimizer does not change the loss landscape. But now I'm confused if its just ...
0
votes
1
answer
20
views
Pytorch backward error
Here I overcame a problem about backward, below is a simple example written by python code.
the print information is that
This really confused me as self.weights is used as a important part in my ...
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
22
views
ML Methods For Modelling Latent Variables
I have some time series predictor variables, $\{\mathbf{X}_t\} = \{\mathbf{X}_0, \ldots, \mathbf{X}_n\}$, and some other time series data $\{\mathbf{Z}_t\} = \{\mathbf{Z}_0, \ldots, \mathbf{Z}_n\}$.
...
-1
votes
1
answer
51
views
0
votes
2
answers
95
views
How can I use a model trained with batches to make predictions with single sample?
I'm training a PyTorch model with batches of 128 images, and after going through multiple convolutions, they're flattened (with .flatten) before being passed to a ...
0
votes
0
answers
143
views
Runtime Error: one of the variables needed for gradient computation has been modified by an inplace operation:
I have the following code for a reinforcement learning using proximal policy optimization. It gives the following run time error.
...
1
vote
1
answer
101
views
Neural Net not able to learn simple analytical equation
I am currently making my first attempts with Pytorch. I am trying to solve a simple equation with a neural net. Analytically solved, the result of my neural net shall look like this:
$$
y = \frac{x_5}{...