ظهور الخطأ التالي ImportError: cannot import name 'to_categorical' from 'keras.utils' (/usr/local/lib/python3.7/dist-packages/keras/utils/__init__.py) أثناء محاولة استيراد الدالة to_categorical في كيراس
أحاول استخدام الدالة to_categorical على غوغل كولاب لكن يظهر لي الخطأ التالي عندما أحاول استيرادها:
from keras.utils import to_categorical
y_train=to_categorical(y_train)---------------------------------------------------------------------------ImportErrorTraceback(most recent call last)<ipython-input-1-812bfb11e6e7>in<module>()---->1from keras.utils import to_categorical
2 y_train=to_categorical(y_train)ImportError: cannot import name 'to_categorical'from'keras.utils'(/usr/local/lib/python3.7/dist-packages/keras/utils/__init__.py)---------------------------------------------------------------------------
NOTE:If your importis failing due to a missing package, you can
manually install dependencies using either !pip or!apt.To view examples of installing some common dependencies, click the
"Open Examples" button below.---------------------------------------------------------------------------
علماً أنني أقوم باستيرادها بنفس الشكل ضمن ال IDE على جهازي؟ما الحل؟
السؤال
Meezo ML
أحاول استخدام الدالة to_categorical على غوغل كولاب لكن يظهر لي الخطأ التالي عندما أحاول استيرادها:
علماً أنني أقوم باستيرادها بنفس الشكل ضمن ال IDE على جهازي؟ما الحل؟
1 جواب على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.