0
$\begingroup$

I'm reading through some pytorch code published as part of a research paper.

The input data is of the shape (batch_size, number_of_time_steps, number_of_predictor_variables, height, width). The code manipulates the data by transposing to be (batch_size, height, width, number_of_time_steps, number_of_predictor_variables), and reshaping to (batch_size * height * width, number_of_time_steps, number_of_predictor_variables). This is then fed into an RNN, and the final output is reshaped back to (batch_size, -1, height, width).

Question 1. My instinct is that this hopelessly jumbles the data (in particular, that the "batch size" is now batch_size * height * width means that each sample has been cut up into multiple smaller "samples"), and that the resultant trained model is useless. Is this correct, or am I missing something?

Question 2. Is it more correct to instead reshape to (batch_size, number_of_time_steps, number_of_predictor_variables * height * width)?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.