Make an Adaptor class which will wrap around the datasource and resize the data to the network's input shape - Make several resizing strategies available - Make sure to update it when the network changes
Make an Adaptor class which will wrap around the datasource and resize the data to the network's input shape