Mirror Distributed Strategy 
Hi **@hafizuriu** ,
In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here and version also.

Thank you! I'm using tensorflow version 2.14 Hi @hafizuriu ,
In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here.

Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.
I'm facing issues when I tried to run model using mirror distributed strategy.
I want to run multiples model one by one in a loop using distributed strategy. First model runs well but is shows error before start the next model.

```
Collective ops is aborted by: Shape mismatch in the collective instance 100. Op at device /job:localhost/replica:0/task:0/device:GPU:2 expected shape [28678440] but another member in the group expected shape [39166184]. This is likely due to different input shapes at different members of the collective op.
The error could be from a previous operation. Restart your program to reset.
	 [[{{node CollectiveReduceV2_2}}]] [Op:__inference_train_function_51026]
```

Here is my code-

```

strategy = tf.distribute.MirroredStrategy()
# Set up model within scope
with strategy.scope():

    model = Create_model()

    optimizer = SGD(learning_rate=0.01, weight_decay=1e-4,momentum=0.9)
    model.compile(loss='sparse_categorical_crossentropy', optimizer=optimizer, metrics=['sparse_categorical_accuracy','sparse_top_k_categorical_accuracy'])

checkpoint = ModelCheckpoint('Best_model.h5', 
                          monitor='val_loss', 
                          save_best_only=True, 
                          mode='min', 
                          verbose=0)
lr_reduce = ReduceLROnPlateau(
    monitor='val_loss',
    factor=0.1,
    patience=5,
    verbose=0,
    mode='min',
    )


model.fit(train_generator,validation_data=valid_generator,steps_per_epoch=len(train_generator),\
    validation_steps=len(valid_generator), epochs = 50,\
    callbacks=[checkpoint,lr_reduce], verbose=1
    )

```