@Ahmad_Pouramini this will not be an easy problem to solve. The best way forward would be to have no intersecting groups.
However, if you want to go ahead, you can use some sort of weight averaging
  
      

      pytorch.org
  

  
    

PyTorch 1

  An open source machine learning framework that accelerates the path from research prototyping to production deployment.