You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, while running the example pynb, I got the following error:
======== Epoch 1 / 3 ========
Training...
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <module>:89 │
│ │
│ 86 │ │ # calculate the average loss at the end. `loss` is a Tensor containing a │
│ 87 │ │ # single value; the `.item()` function just returns the Python value │
│ 88 │ │ # from the tensor. │
│ ❱ 89 │ │ total_train_loss += loss.item() │
│ 90 │ │ │
│ 91 │ │ # Perform a backward pass to calculate the gradients. │
│ 92 │ │ loss.backward() │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'str' object has no attribute 'item'
Looks like something is wrong, the model is not producing a correct output.
Any hint to solve this?
The text was updated successfully, but these errors were encountered:
Hi, while running the example pynb, I got the following error:
Looks like something is wrong, the model is not producing a correct output.
Any hint to solve this?
The text was updated successfully, but these errors were encountered: