So the code goes like:
def num_flat_features(self, x):
    size = x.size()[1:]  # all dimensions except the batch dimension
    num_features = 1
    for s in size:
        num_features *= s
    return num_features

x.size()[1:] would return a tuple of all dimensions except the batch. e.g. if x is a 25x3x32x32 tensor (an image), then size would be 3x32x32 and thus num_features would be 3x32x32 = 3072. So it’s the total number of pixels in that image. In other words flat_features are “flattened features”.