How did you apply the weight sharing? Could you share the code for it?
If you just stored the parameter once and apply the functional API call using this parameter, there should be no problem I think.