Hello there!

**Analysis**

I am having an issue similar to what has been reported back then in May:

Back then it seems that the issues were one of these three possible causes:

- Either the square function was not working and needed to be replaced by **2, or
- The issue was with the transposing in a previous cell (UNQ_C3)
- The Kernel needed to be restarted

I checke / tried these. However, in my case is neither.

**Error raised**

```
Tensor("Sum:0", shape=(), dtype=float32)
Tensor("Sum_1:0", shape=(), dtype=float32)
Tensor("Sum_2:0", shape=(), dtype=float32)
Tensor("Sum_3:0", shape=(), dtype=float32)
Tensor("Sum_4:0", shape=(), dtype=float32)
Tensor("Sum:0", shape=(), dtype=float32)
Tensor("Sum_1:0", shape=(), dtype=float32)
Tensor("Sum_2:0", shape=(), dtype=float32)
Tensor("Sum_3:0", shape=(), dtype=float32)
Tensor("Sum_4:0", shape=(), dtype=float32)
tf.Tensor(10221.386, shape=(), dtype=float32)
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-50-e8adb96bb73f> in <module>
5 print(J1)
6 assert type(J1) == EagerTensor, f"Wrong type {type(J1)} != {EagerTensor}"
----> 7 assert np.isclose(J1, 10221.168), f"Unexpected cost for epoch 0: {J1} != {10221.168}"
8
9 J2 = train_step(generated_image)
AssertionError: Unexpected cost for epoch 0: 10221.3857421875 != 10221.168
```

**Cause**

`10221.3857421875 != 10221.168`

**Assertions**

There are two test cases, J1 and J2. The difference is really micro-small for test case J1, and the code passes the assert in J2.

```
J1 = train_step(generated_image)
print(J1)
assert type(J1) == EagerTensor, f"Wrong type {type(J1)} != {EagerTensor}"
assert np.isclose(J1, 10221.168), f"Unexpected cost for epoch 0: {J1} != {10221.168}"
J2 = train_step(generated_image)
print(J2)
assert np.isclose(J2, 6081.23541, rtol=0.05), f"Unexpected cost for epoch 1: {J2} != {6081.2354}"
```

Could anybody please point here where I can probe further? I am stuck now for a while and this is the only notebook cell raising an assert. Everything else worksâ€¦

Thanks!!!