Questions tagged [recurrent-neural-network]

A recurrent neural network (RNN) is a class of artificial neural network where connections between units form a directed cycle.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

How to use LSTM ? RecurrentPPO from sb3-contrib

I'm working on creating an LSTM-based reinforcement learning model and trying to understand how Recurrent PPO from sb3-contrib works. Here's a simplified example of the code: # import gym # from gym ...
IAQuestions's user avatar
0 votes
0 answers
6 views

Stacked Conditional-RNN (LSTM) layers with multi-step prediction output with different timesteps as input

I am building a stacked LSTM time prediction model, with 299 household's energy consumption data. Together with the temporal energy consumption data, I have the location of every household. I want to ...
Jané Weys's user avatar
0 votes
0 answers
12 views

Call arguments received by layer 'sequential_6' (type Sequential): inputs=tf.Tensor(shape=(None, 100, 13, 13), dtype=float32) training=True mask=None

i'm working on a speech recognition usign lstm model, i'm using the mini speech recognition command dataset, the tutorial given on tensorflow simple audio, is for classification and they used CNN, so ...
NamiCyp's user avatar
0 votes
0 answers
4 views

RLlib RecurrentNetwork and Trajectory View API

I've been reading over the AttentionNet file for both the GTrXL and AttentionNetWrapper implementations located at ray/rllib/models/torch/attention_net.py at master · ray-project/ray (github.com). A ...
user2793618's user avatar
0 votes
0 answers
19 views

Is my 1D signal using CNN & RNN regression reasonable?

I want to know if my impact-echo signals are proper with CNN or RNN regression model. I got some simulated signal, as following figure shows. In previous research, people mostly consider frequency or ...
hui30319's user avatar
1 vote
1 answer
27 views

Fitting an RNN model using a tensorflow dataset

I'm still new to using TensorFlow datasets and would like some help with the following. Assume I have a matrix where each row is an observation and I would like to use the window function in order to ...
user3245747's user avatar
0 votes
0 answers
19 views

How do I make a Tensorflow RNN accept a single timestep during prediction?

I am a researcher attempting to develop a hybrid CNN-RNN network to generate a sequence of outputs that approximates a multiphysics simulation. I have already trained the CNN portion of the network (...
gutza1's user avatar
  • 1
0 votes
1 answer
25 views

Input 0 of layer "bidirectional" is incompatible with the layer: expected ndim=3, found ndim=2. shape received: (None, 32)

Here is the snippet of code: vectorizer = TextVectorization(max_tokens=MAX_FEATURES, output_sequence_length=1800, output_mode='int') ...
moosecles's user avatar
0 votes
0 answers
12 views

Splitting into x_train and y_train Recurrent Neural network using time steps

Training a recurrent neural network to predict opening stock prices. train = train.loc[:, ["Open"]].values scaler = MinMaxScaler(feature_range=(0, 1)) train_scaled = scaler.fit_transform(...
Jacob's user avatar
  • 15
-1 votes
0 answers
15 views

What is the canonical example of a recurrent neural network like MNIST is for a plain one?

Image classification using the MNIST dataset seems to be the standard, canonical example of machine learning using a fully connected neural network. What is the analogue for a recurrent neural ...
Tomek Dobrzynski's user avatar
0 votes
0 answers
60 views

Issues with LSTM-based Time Series Prediction in TensorFlow

I'm trying to predict time-series stock market data using TensorFlow and a Recurrent Neural Network (RNN) with LSTM layers. However, I encountered an input data shape-related error. So, I need ...
Switzerland2020's user avatar
0 votes
0 answers
45 views

Very low accuracy and high loss with LSTM model

I try to learn the inverse kinematics of a robotic manipulator. To do that I have a simulator with which I acquired data. My dataset is composed of positions in X, Y and Z and actuator variables (6 of ...
Guillaume's user avatar
0 votes
1 answer
29 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 ...
sam's user avatar
  • 7
0 votes
0 answers
42 views

SimpleRNN: why loss does not decreases when using mini-batches?

I am trying to implement from scratch a simple neural network framework, just to learn more about NN. I had success in implementing feed forward, fully connected neural network, but I am having some ...
Abracadabra's user avatar
0 votes
0 answers
36 views

How to resolve environment exceptions in Python?

I wrote a simple RNN-model in PyCharm using PyTorch (tried Anaconda as well) with the goal to do a binary prediction and I get many exceptions that don't seem to directly be linked to my code: File ......
M.P's user avatar
  • 1
0 votes
0 answers
11 views

how to predict RNN with test dataset

i have a timeseries weather dataset for a school with multiple features. it has 28 places and i want to predict humidity data for these 28 places. i create sequence dataset for test and validation set ...
Faeze Hodavand's user avatar
0 votes
0 answers
28 views

ValueError: Expected input batch_size (300) to match target batch_size (100)

I am trying to run RNN with COVID19+PNEUMONIA+NORMAL Chest X-Ray Image Dataset from Kaggle but getting an error like Expected input batch_size (300) to match target batch_size (100). I am running the ...
Rakib Hasan Bappy's user avatar
1 vote
1 answer
35 views

Integration of Custom Data Loader with LSTM

I am trying to integrate Custom Data Loader with LSTM num_epochs = 10 for epoch in range(num_epochs): model.train() for batch_x, batch_y in dl: optimizer.zero_grad() outputs = ...
Aneyasha Sarkar's user avatar
0 votes
0 answers
6 views

Call tf.stop_gradient() on hidden states of recurrent neural network in Tensorflow/Keras

I have a question on Tensorflow/Keras and the use of tf.stop_gradient() in connection to RNN:s. In this pytorch guide, they call .detach() on the hidden states that the model outputs before passing it ...
user202542's user avatar
0 votes
2 answers
35 views

Deeplearning4J RNN Training : Exception 3D input expected to RNN layer expected, got 2

with the following code (tweaked for hours with different params), I keep getting an exception java.lang.IllegalStateException: 3D input expected to RNN layer expected, got 2 What I am trying to ...
Mark Giaconia's user avatar
0 votes
0 answers
29 views

Error in LSTM-based RNN training: "IndexError: index out of range" during DataLoader iteration

I'm currently working on training an LSTM-based RNN using PyTorch and encountering an error during the training loop I've tried various solutions to resolve this issue but I'm still facing the same ...
capdescx's user avatar
0 votes
0 answers
17 views

Varying Length (Timesteps) Sequences for PyTorch LSTM Training

I have a dataset with shape (1000,1440,2) which is (samples,timesteps,features) as a np array. Each sample has its own number of timestep, so to create this dataset, I have padded the samples with a ...
kasrash's user avatar
0 votes
0 answers
9 views

RNN where features are sequences with different lengths

I have a sequential RNN using Keras. Some of my features are sequences with different lengths (eg time series where data is collected daily or monthly) and some other features are scalars. Would this ...
as76's user avatar
  • 71
0 votes
0 answers
20 views

Stacked Bidirectional LSTM model

The following is the stacked bidirectional LSTM model using TF2. class ForexPredictionModel(tf.keras.Model): def __init__(self, seg_len, **kwargs): super(ForexPredictionModel, self).__init__(**...
batuman's user avatar
  • 7,086
0 votes
0 answers
11 views

Difference between Stacked RNN Cells and Stacked LSTM

What is the difference between Stacked RNN Cells like below and stakced LSTM like below.
batuman's user avatar
  • 7,086
1 vote
0 answers
22 views

After the training of the train set in Python, the value of accurancy, recall and f1-score is 0

I am using the Flair library in python for a Fake News Detection problem, using an RNN-based algorithm. The code does not give errors, but the training phase is excessively slow and also at the end of ...
sim's user avatar
  • 11
1 vote
0 answers
38 views

How to make particular recurrent connection in my Keras/tensorflow neural network model?

I have a LSTM feed-forward neural network as written below. For some reasons, I need to add a backward (recurrent) connection from layer3 to layer1 as well, which results in a loop in my model's ...
Mohammad's user avatar
  • 163
0 votes
0 answers
35 views

Predicting future values in a multivariate time forecasting LSTM model that predict future 10 days price on the basis of previous data

I am confused on how to predict future results with a time series multivariate LSTM model. I am trying to build a model for a stock market prediction and I have the following data features Date High ...
Hamzakhan Swati's user avatar
0 votes
0 answers
17 views

Custom GRU implementation performing very slow

I am working on customizing the GRU layer to suit my specific requirements. To achieve this, I am implementing a custom GRU layer following the architecture and implementation of the GRU layer in ...
Bisnu Sarkar's user avatar
0 votes
1 answer
20 views

Stacked RNN with dynamic batch size for training and deployment

The following code is from TF's stacked RNN link. batch_size = 3 sentence_max_length = 5 n_features = 2 new_shape = (batch_size, sentence_max_length, n_features) x = tf.constant(np.reshape(np.arange(...
batuman's user avatar
  • 7,086
0 votes
0 answers
12 views

How to inverse transform a prediction from Recurrent Neural Network? [duplicate]

I am trying to implement a simple RNN on a Y Variable and 2 X Variables. A dataframe is created with random numbers in it and is split to a train and test sets. The train set is used to train the RNN ...
Mahmoud Abdel-Rahman's user avatar
-1 votes
1 answer
44 views

Data preparation for multi-label text classification in deep learning

I am trying to create a deep learning model that scans menu. In particular, it can categorize a block of text into dish name, dish price, or dish description, etc. Based on my basic knowledge of deep ...
Kevin Tommy's user avatar
-2 votes
1 answer
45 views

Understanding LSTM for speech recognition

I am trying to understand LSTM for speech recognition. I do understand that LSTM here basically generates phone index (let's say each unique phone is mapped to a unique integer) at the output for ...
Anantha Krishnan's user avatar
0 votes
1 answer
63 views

How does Open VINO handle state in RNN-like layers? Is every recurrent model stateful by default?

I converted my tensorflow model to OV like this: from openvino.runtime import serialize ir_path = Path(model_path)/"openVINO/serialized_model.xml" ov_model = convert_model(cloned_model, ...
Gustaw Ohler's user avatar
0 votes
0 answers
13 views

Deep Transition RNN in keras

I need to use a Deep Transition RNN in keras (when there are several layers connected in a row inside a recursive block). In my case, I need "image detecting" layers (something like conv2D + ...
Maksim Belov's user avatar
0 votes
1 answer
32 views

LSTM Encoder-Decoder stuck in plateau and not learning

I am testing my LSTM Encoder-Decoder architecture with a simple task: to recognise vowels in random character sequences. My tsv data looks like this: molteyhpr 010011000 dlkz 0000 fabgovmgg ...
Lex Podgorny's user avatar
  • 2,618
0 votes
0 answers
38 views

Ansatz parameters not getting updated in custom QRNN model (qiskit)

I'm trying to develop a Hybrid-qRNN model to predict a cosine wave. For this, I'm passing 7 values of x(t) and the output is based on the 7th value's output. However, when I call loss.backward() on ...
Vignesh Krishnan's user avatar
0 votes
0 answers
25 views

Build a Deep Audio Classifier with Python and Tensorflow

I have been following Nicholas 'Build a Deep Audio Classifier with Python and Tensorflow" https://youtu.be/ZLIPkmmDJAc Our data set is different, my problem consists of recognizing speech with ...
Shreeya Sharma's user avatar
0 votes
0 answers
16 views

RNN/LSTM: Out of memory when building one-hot representation

I am building a translation RNN LSTM model with encoder-decoder architecture. It does translation from language to language. Input file contains lines of tab-separated pairs of language samples. I ...
Lex Podgorny's user avatar
  • 2,618
1 vote
1 answer
67 views

How can i improve my recurrent neural network

I want to implement a recurrent neural network for natural language inference. I'm new in this topic and this is a task from a module from my university, so i've had some code beforehand which i tried ...
Felix Wernlein's user avatar
0 votes
0 answers
12 views

Aren't the class outputs independent in the model trained with the multilabel dataset?

I'm trying to train a model that uses a Graph RNN structure. The model was initially implemented as a single label and I had very successful results. When I use the same dataset as a multilabel, I ...
Salihcan's user avatar
0 votes
1 answer
25 views

RNN input and output Shape

I’m trying to build an RNN with tf.keras to generate text. Let’s say I have 100 poems from Shakespeare with a max length of 50 words and I’m using 10k English words as my vocab dictionary. Thus, my ...
Brad Brad's user avatar
1 vote
0 answers
16 views

How to set initial state of H and C arrays when using Tensorflow LSTM?

I am trying to implement an Encoder-Decoder LSTM using Tensorflow. For the first encoder layer, I want to: set the initial state for the H (hidden state) as as array of all ones and set the initial ...
Corey Murphy's user avatar
0 votes
0 answers
12 views

hidden cells in LSTM doesn't work for autoregressive condition

I use LSTM with Scheduled Sampling to do a fit a dynamic model. But what I found strange is that. When I evaluate a model with autoregressive task, If I use the hidden cell from the last step, the ...
Jo_QIU's user avatar
  • 1
0 votes
0 answers
13 views

How to format input data for denoising signal using LSTM-RNN?

I have an noisy input data and it's corresponding Ground Truth values for each timestep. The values are floats. Basically the input and output data is in the form of 1D array of floats. I want to ...
Aditya Pratap Singh's user avatar
0 votes
0 answers
12 views

Which model structure should be used for building a NER-like classification model on sensor data?

I am working on a seq2seq model that will work on the sensor data attached to the athlete's leg, which can mark the start and end indexes on the sensor data such as "step start" "step ...
Salihcan's user avatar
0 votes
0 answers
20 views

Submit NLP classification model to Kaggle

I am having a hard time converting my RNN/NLP model to Kaggle competition in csv file. I am a total beginner in file converting. I am already at the point where I am comparing my test model to ...
FastBoi's user avatar
  • 163
1 vote
0 answers
15 views

How to Deal with Multiple Patterns in Financial Pattern Classification?

I have a question regarding my project on financial pattern classification using deep learning. Currently, I have organized my data into sequences of 30 days, and within each 30-day sequence, there ...
Mouad's user avatar
  • 11
0 votes
0 answers
39 views

Input 0 of layer "dense" is incompatible with the layer: expected min_ndim=2, found ndim=1. Full shape received: (None,)

/tmp/ipykernel_28/859774433.py:11: UserWarning: `Model.fit_generator` is deprecated and will be removed in a future version. Please use `Model.fit`, which supports generators. history = model....
Nour Nirabi's user avatar

1
2 3 4 5
68