Skip to content

Commit e4614c6

Browse files
Merge pull request yandexdataschool#66 from NickVeld/patch-20
week9:adversarial_pytorch scalar tensor is not "[ x ]" now
2 parents 51fe404 + 6cbd2d9 commit e4614c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

week09_adversarial/adversarial_pytorch.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
"\n",
285285
"print(loss)\n",
286286
"\n",
287-
"assert len(loss.shape) == 1 and loss.shape[0] == 1, \"loss must be scalar\""
287+
"assert len(loss.shape) == 0, \"loss must be scalar\""
288288
]
289289
},
290290
{
@@ -324,7 +324,7 @@
324324
"\n",
325325
"print(loss)\n",
326326
"\n",
327-
"assert len(loss.shape) == 1 and loss.shape[0] == 1, \"loss must be scalar\""
327+
"assert len(loss.shape) == 0, \"loss must be scalar\""
328328
]
329329
},
330330
{

0 commit comments

Comments
 (0)