The Acquisition of Physical Knowledge in Generative Neural Networks