Reducing tensor dimensions with network

MR.Hossein19: <p>Hi<br>
I have 2 input tensor and [16, 2, 310] is size of first and [16, 6] is size of second tensor.<br>
My label size is [16, 5].<br>
The size of the first tensor can be changed. ([16, 2, x], x=everything)<br>
How can I give two tensors to the network that can finally have the same dimensions as the labels?<br>
My data is well test data in petroleum engineering science.</p>

astle_dsa: <p>How can two inputs have different dimensions ? Are they from different datasets ?<br>
Your inputs need not be of the same dimensions as your output: they can be different, the nn.LazyLinear layer handles the dimensionality reduction part. That said, your inputs need to have similar dimensions, but before reducing/expanding the dimensions, you must ensure that doing so is plausible.</p>

MR.Hossein19: <p>My data is well test data in petroleum engineering science.<br>
In a well test operation, pressure is obtained as a function of time. which is the first tensor. And the well has few characteristics for which there is only one number. In other words, the pressure data set in terms of time is related to several parameters with only one numerical value.</p>

astle_dsa: <p>It would be great if you can provide an example.</p>

MR.Hossein19: <p>Ok this is my data<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/5/1/51b95ae7af81f415017cef5e86671cbe5e1d94fa.png" data-download-href="https://discuss.pytorch.org/uploads/default/51b95ae7af81f415017cef5e86671cbe5e1d94fa" title="distorch(data)"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/51b95ae7af81f415017cef5e86671cbe5e1d94fa_2_690x388.png" alt="distorch(data)" data-base62-sha1="bEXNo1mgiXsTzI4bcD9rdgoTo4q" width="690" height="388" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/51b95ae7af81f415017cef5e86671cbe5e1d94fa_2_690x388.png, https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/51b95ae7af81f415017cef5e86671cbe5e1d94fa_2_1035x582.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/51b95ae7af81f415017cef5e86671cbe5e1d94fa_2_1380x776.png 2x" data-dominant-color="F2F4F3"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">distorch(data)</span><span class="informations">1920×1080 88.3 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
This is a data from my database.<br>
pressure, time, well radius and … is input<br>
kh, omega, lambda and C is output or label</p>

J_Johnson: <p>Make a 1D CNN, RNN or Transformer branch for your sequential data(i.e. shape [batch_size, seq_len, features]), and a separate branch of linear layers for your orthogonal data(i.e. shape [batch_size, features]). Then concatenate those outputs into a final head(i.e. linear layer with outputs size matching your labels).</p>
<p>Make sure to also normalize all data to a range of 0 and 1.</p>

MR.Hossein19: <p>What is meant by normalization?<br>
How I can normalize all data?</p>

J_Johnson: <p>Max-min is the most common:<br>
<a href="https://www.researchgate.net/figure/Different-normalization-methods-Normalization-function_tbl1_318689689" class="onebox" target="_blank" rel="noopener nofollow ugc">https://www.researchgate.net/figure/Different-normalization-methods-Normalization-function_tbl1_318689689</a></p>