You can override the function without actually modifying the source code like the following.
import efficientnet_pytorch
def my_efficientnet_forward(self, inputs):
	""" Calls extract_features to extract features, applies final linear layer, and returns logits. """
	bs = inputs.size(0)
	# Convolution layers
	x = self.extract_features(inputs)

	# Pooling and final linear layer
	x = self._avg_pooling(x)
	FV = x.view(bs, -1)
	h = self._dropout(FV)
	Logit = self._fc(h)
	return (FV, logit)

efficientnet_pytorch.EfficientNet.forward.__code__ = my_efficientnet_forward.__code__