Representing Neural Network Layers as Linear Operations via Koopman Operator Theory