Extraction of nonlinearity in neural networks with Koopman operator