日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

解决python调用TensorFlow时出现FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate

發布時間:2024/9/20 python 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 解决python调用TensorFlow时出现FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

最近因為要做一個基于深度學習的人臉識別項目,要用到TensorFlow,但是下載完成后后發現import tensorflow總是出現FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'._np_quint8 = np.dtype([("quint8", np.uint8, 1)])的錯誤,如圖

百度了許多,很多說是numpy的版本不對,換了numpy的版本就行了,但是我換了好幾個版本都沒用,仍然報錯,最后發現,可以在pycharm中使用Import tensorflow,然后將點進出現的警告,進入dtype.py,修改對應行的代碼,把np.dtype([("quint8", np.uint8, 1)])修改為np.dtype([("quint8", np.uint8, (1,))])就完美解決了,如圖

修改為


————————————————
版權聲明:本文為CSDN博主「涵小呆」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/BigDream123/article/details/99467316

總結

以上是生活随笔為你收集整理的解决python调用TensorFlow时出现FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。