Hi,

at the end of the week 3 assignment under the section “3.3 - Train the model” I have a question about the line of code, where the “epoch_cost” is accumulated:

```
epoch_cost += minibatch_cost / minibatch_size
```

Why do we divide by “minibatch_size”? Does the function “compute_cost”, which we had to define beforehand, not return a cost value which already was normalized based on the number of training examples?

To put it differently: In “compute_cost” we had to use “tf_reduce_mean” and as far as I know this function already takes care about dividing by the number of training examples, right?

So in my opinion dividing the “minibatch_cost” by the minibatch_size again in the line of code above is not correct. Or am I missing something here?

Thanks in advance!