In your code snippet, 128*7*7 is interpreted as 6272.
The way to write the input shape as a multiplication makes instead of the result directly makes it easier to understand the shape.
E.g. when this linear layer is preceded by conv layers, you would flatten the conv activation, so that it’ll have the shape [batch_size, channels*height*width]. In this case it’s clear to define in_features as channels*height*width or in your case 128*7*7.
However, in the Keras code these numbers are not multiplied, but seem to be passed as a multi-dimensional shape?
Note that I’m not deeply familiar with Keras, so my interpretation might be wrong.