All Questions
60 questions
0
votes
1
answer
55
views
PyTorch's seq2seq tutorial decoder
I am learning through PyTorch's seq2seq tutorial: https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html
I have a question about the decoder
class DecoderRNN(nn.Module):
def ...
0
votes
0
answers
116
views
LSTM model prediction does not change with different inputs
I am implementing in PyTorch an LSTM model to predict if the closing value of a stock will go up or down in the next 5 and 10 minutes.
Specifically, I am using 24 years of 5 minute data with 19 ...
0
votes
1
answer
114
views
Why my RNN does not converge to a simple task?
I want to create a recursice model to solve the most simple sequence that I know, Arithmetic progression. With having a as the base and d as the step size, the sequence would be as follows:
a, a+d, a+...
0
votes
3
answers
425
views
Simple RNN with more than one layer in Pytorch for squential prediction
I got sequential time series data. At each time stamp, there is only variable to observe (if my understanding is correct this means number of features = 1). I want to train a simple RNN with more than ...
0
votes
1
answer
76
views
My LSTM network doesn't work while doing inference?
I'm trying to built a Conv-LSTM network using PyTorch, model is pretty much like an image caption generator, the model learns to predict words pretty good while training but doesn't predict anything ...
0
votes
1
answer
219
views
Using Recurrent Neural Networks for binary values prediction
EDIT: The problems stated have been solved, you'll first find the solution, the initial question is stated below!
SOLUTION:
Applying the .unsqueeze(0) to my inputs solved the problem with the ...
3
votes
2
answers
1k
views
Using RNN Trained Model without pytorch installed
I have trained an RNN model with pytorch. I need to use the model for prediction in an environment where I'm unable to install pytorch because of some strange dependency issue with glibc. However, I ...
0
votes
1
answer
840
views
LSTM always predicts the same class
I’m trying to solve an nlp classification problem with a LSTM. The code for the model is defined here:
class LSTM(nn.Module):
def __init__(self, hidden_size, embedding_size=66 ):
super()....
1
vote
2
answers
3k
views
Training LSTM over multiple datasets of different timestep number
I'm new to working with LSTMs and I'm stuggling to understand them even intuitively.
I'm using them for a Regression problem, I'm having about 6000 datasets of ~450 timesteps each and every timestep ...
1
vote
1
answer
910
views
Pytorch Binary Classification RNN Model not Learning
I'm working on a binary classification task with Pytorch and my model is failing to learn, I can't figure out if it is a problem with the model or with the data.
Here is my model:
from torch import nn
...
1
vote
1
answer
842
views
pytorch RNN loss does not decrease and validate accuracy remains unchanged
I'm training a model using Pytorch GRU on a text-classification task (output dimension is 5). My network is implemented like the codes below.
class GRU(nn.Module):
def __init__(self, model_param: ...
0
votes
0
answers
198
views
How to implement a efficient structure like GRU in pytorch?
I have a model A which is pretrained. This model A will take x_{t-1} and p_{t} to predict x_{t}. Since it is actually a PyTorch neural network it is differentiable.
What I want to do is I want this ...
0
votes
1
answer
905
views
arguments and function call of LSTM in pytorch
Could anyone please explain me the below code:
import torch
import torch.nn as nn
input = torch.randn(5, 3, 10)
h0 = torch.randn(2, 3, 20)
c0 = torch.randn(2, 3, 20)
rnn = nn.LSTM(10,20,2)
output, (...
1
vote
0
answers
886
views
Pytorch's GRUCell and inputs of higher dimension
The documentation for Pytorch's GRUCell claims that in torch.nn.GRUCell(input_size, hidden_size, bias=True), input_size is the number of expected features in the input. So it should be an int and you ...
7
votes
1
answer
10k
views
Enforce pad_sequence to a certain length
I have a set of tensors that I'm padding with pad_sequence but I need to guarantee a fixed length for them. I can't do it right now as pad_sequence will extend the shorter tensors up to the longest, ...