Error "SystemError: Negative size passed to PyUnicode_New"

841 views
Skip to first unread message

dei...@gmail.com

unread,
Aug 1, 2022, 6:13:58 AM8/1/22
to Keras-users

Hello

I am a newbie.

I get the following error:
"SystemError: Negative size passed to PyUnicode_New"

when I run the following program:
https://github.com/keras-team/keras-io/blob/master/examples/generative/ddim.py

Please help.

Thanks.

Lance Norskog

unread,
Aug 1, 2022, 8:54:48 PM8/1/22
to dei...@gmail.com, Keras-users
Just tried it on Colab with tensorflow 2.8.2/keras 2.8.0 and that worked.
You have to do the code changes mentioned in the 'Training' block to get the new AdamW optimizer.

Just tried it on TF & Keras 2.9.0 and there are version skew problems.

Good luck,

Lance Norskog


--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/d3ac1f66-7a69-461d-a2b7-bff88d3257aen%40googlegroups.com.


--
Lance Norskog
lance....@gmail.com
Redwood City, CA

dei...@gmail.com

unread,
Aug 2, 2022, 3:46:43 AM8/2/22
to Keras-users
I checked the *Training* block, but no success. What exactly should I be doing?

Lance Norskog

unread,
Aug 2, 2022, 10:23:39 PM8/2/22
to dei...@gmail.com, Keras-users
It uses the AdamW optimizer, which is in "experimental" for 2.8.2. You can just change it to 'adam':

optimizer='adam',



Reply all
Reply to author
Forward
0 new messages