LSTM code using pytorch

Job ID: 32403627

Budget: $30 – $250 USD

Budget: $90
Deadline: 12.20.2021 11 P.M. EST
in order to apply this LSTM API, according pytorch documentation, we need three input parameters, i.e., input_tensor of shape (L,N, H_in) assuming batch first defaulted to false, h_0 of shape (D∗num_layer,N, H_out) and c_0 of shape (D∗num_layers,N,H_cell), where N is batch size, and D= 2 if bidirectional=True otherwise 1. What are the expected value for num_layer and H_in for input_tensor and h_0, respectively?
Provide a few lines of code in 3 different ways to create random tensors based on your answer in the previous problem and then apply the LSTM API by assuming that L=6, N=4, bidirectional defaulted to false (hence D=1), and proj_size defaulted to 0. Use any value of your choice for any other parameters if they are not specified. Attach your code as p2p3.py (3 different ways)