Solving stochastic partial differential equations using neural networks in the Wiener chaos expansion