elemeo:

however how was the 25 chosen ?


I’ve reused the out_features from your code snippet as you’ve picked this number of output features.



 elemeo:

Also, since the first layer outputs a shape of 25 then the second layer will have an input of 25 with what output ?


Yes, that’s correct. The number of output features again depends on your choice.



 elemeo:

what happens to variable information when a batch splits an observation into multiple batches.


Most layers process the samples of a batch independently so you would only see the expected abs. error due to the limited numerical precision in their outputs. Exceptions are e.g. batchnorm layers, which calculate the stats to normalize the inputs from the entire batch.