Commit 7e40ee3
authored
Dev zhanglu (#3649)
Check whether the size of the embedding layer has been resized, rather
than checking if the length of the tokenizer is equal to the size of the
embedding layer.
This is because the embedding layer of the model may be resized and
padded to a multiple of 16, but the tokenizer may not be padded, which
will cause the freezing layer to fail. However, at this time, the
embedding layer will not be resized and freezing can still be performed.1 parent fd9ecfa commit 7e40ee3
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | 333 | | |
337 | 334 | | |
338 | 335 | | |
339 | 336 | | |
340 | 337 | | |
341 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| |||
0 commit comments