Hi Aysuda!



 aysuda:

The state is a numpy array (128, 100)


What is the meaning of the value 128 and the value 100?
Linear (in_features = 128, out_features = 64) will apply
an affine transformation to a batch of input vectors of length 128 to
produce a  batch of output vectors of length 64.  Is your dimension
of length 128 the dimension to which you want to apply such a
transformation?


So the input must be [1, 128]?


No, your input doesn’t have to have shape [1, 128] (although
this would be a valid shape for your input).  But the trailing dimension
of your input  does have to be 128 so that it will match the value
of in_features in your Linear.
In the typical use case input will have shape [nBatch, 128], where
nBatch is the number of samples in your batch.
(A Linear, however, can accept multiple “batch” dimensions, so a
tensor of shape [nBatch, nSomethingElse, 128] would be a valid
input for a Linear with in_features = 128.)
Best.
K. Frank