Flatten should remove all but the batch dimensions of your model and produce a (N, D) tensor. D should match the number of input dimensions to the first layer (if it is not 720, this value should be changed). Also, the output of fc1 will have 50 dimensions, so the input dimensions of fc2 should be changed to 50 (or the output of fc1 to 128).