I want to strictly reproduce the Alexnet neural network with Tensorflow 2:
From the numerous implementations that exist on the internet, I could not find any having the model split in two as described by the paper and the image above. I understand that it was done because of the GPU memory limitation at that time.
But I'm wondering if such implementation is possible with TensorFlow 2 and how? How a model could be split in two, assigned to two different GPUs while still merging the output of some layers (layers 2, 5, 6).
I bet that Keras is too high level to handle this complexity, and the automated distributed strategy of TF makes it hard to control the device assignments and synchronization.
I gave a try by grouping the layers into models (e.g. layer 1 and 2) and assign those groups to their respective device using tf.device('/GPU:x')) while still concatenating the output. And then tried to parallelize and sync the layers across the two GPUs...
But I couldn't get any close.... So, any approach/suggestion is appreciated
