some optimizations in ResNetSynth