Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
in AI and Deep Learning by (50.2k points)

I have the below dataset for a chemical process comprised of 5 consecutive input vectors to produce 1 output. Each input is sampled every minute while the output os sample every 5.


While I believe the output depends on the 5 previous input vectors than I decided to look for LSTMs for my design. After a lot of research on how should be my LSTM architecture, I concluded that I should mask some of the output sequences by zeros and only leave the last output. The final architecture is below according to my dataset:

lstm architecture

My question is: What should be my 3D input tensor parameters? E.g. [5, 5, ?]? And also what should be my "Batch size"? Should it be the number of my samples?

1 Answer

0 votes
by (108k points)

Since you are going for many to one sequence modeling, you don't need to pad zeros to your output. The most easygoing thing would be to perform classification at last time-step i.e after RNN/LSTM sees the 5th input. 

Answering to your question, the dimension of your 3D input tensor will be:

[batch_size, sequence_length, input_dimensionality], 

where sequence_length is 5 in your state (row 1-5, 7-11, 13-17, etc.), and input_dimensionality is also 5 (i.e. column A- E). Batch_size depends on the number of samples (also how much reliable is your data), if you have more than 10,000 examples then batch size of 30-50 should be okay.

If you are looking to learn more about Artificial Intelligence then you visit Artificial Intelligence(AI) Tutorial. Also, if you are appearing for job profiles of AI Engineer or AI Expert then you can prepare for the interviews on Artificial Intelligence Interview Questions.

Browse Categories