I am implementing the VAE model for molecular smiles. (GitHub: https://github.com/dhruv2103/chemvae/tree/tensorflow2). I have made changes to the original git (GitHub: https://github.com/aspuru-guzik-group/chemical_vae) and converted it to run on TensorFlow Version 2.
Now, I am trying to implement tf.distributed.MirroredStrategy()
in this code so that I can utilize the full potential of my device where I have configured 4 GPUs.
This runs perfectly when I train it without tf.distributed.MirroredStrategy()
and with one GPU device. However, when I try to run it on 4 GPUs, it throws error “INVALID_ARGUMENT: required broadcastable shapes”.
Please look at the error provided in a given image.
INVALID_ARGUMENT: required broadcastable shapes
I tried a few examples to resolve this issue provided on GitHub issues & even stackoverflow. some of which are:
RandomCrop causing INVALID_ARGUMENT: required broadcastable shapes
https://community.deeplearning.ai/t/invalidargumenterror-required-broadcastable-shapes-op-squareddifference/384382/3
https://github.com/LIVIAETS/boundary-loss/issues/46
Dhruvesh Kalathiya is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.