
TensorFlow
KimLinks
服务器Linux,嵌入式,STM32都略有涉及,希望可以一起学习进步!
展开
-
TensorFlow—GPU版本运行报错:failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
报错:2021-02-23 00:00:47.646531: E tensorflow/stream_executor/cuda/cuda_blas.cc:238]failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED原因:此时说明你电脑显存占用过高,已经不足!!如果继续 全负载跑比较复杂的TensorFlow网络模型则会导致电脑其他软件运行失败,起到保护电脑的作用。解决:需要在初始化 Session 的时候为其分配固定数量原创 2021-02-23 00:20:39 · 3203 阅读 · 0 评论 -
RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C h
问题:使用 Jupyter Notebook 进行导入import matplotlib.pyplot as plt 报错:D:\Anaconda3\envs\tensorflow\lib\importlib\_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject原创 2021-02-17 01:48:01 · 1109 阅读 · 0 评论 -
jupyter notebook 中报错 ModuleNotFoundError: No module named ‘cv2‘
说明:今天在使用conda 安装opencv 后,在cmd下正常import cv2但是进入Jupyter Notebook 后 import cv2 失败,报错ModuleNotFoundError: No module named 'cv2'原因:发现在conda下安装的包,在 Jupyter Notebook 里面却无法调用。同时发现 Jupyter 的 Kernel 只有Python 3一个环境,不显示 conda create 我添加的其他环境,因此无法调用到当前环境下的c原创 2020-08-15 16:04:38 · 32398 阅读 · 9 评论 -
FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of type is deprecated; in a future解决方法
问题:在搭建开始TensorFlow时用:import tensorflow as tf 第一句就报错: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,)...原创 2019-11-25 01:34:08 · 475 阅读 · 0 评论 -
pip找不到问题:error: Couldn't find a setup script in C:\Users\xxxx\pip和 Permission Error:[WinError 5] 拒绝访
问题:在conda使用pip安装TensorFlow和其他包的时候报错:Permission Error:[WinError 5] 拒绝访问。:‘d:\anaconda3\envs\tensorflow\scripts\pip.exe’error: Couldn’t find a setup script in C:\Users\xxx\pip原因:上述的两个问题都可以归结于pi...原创 2019-11-25 01:02:51 · 6915 阅读 · 8 评论 -
基于Anaconda安装不同版本Python和TensorFlow以及TensorFlow Hello World
由于服务器中本身自己有原装Python 2.7,然后还需要Python 3.7的版本去支持最近的项目去跑TensorFlow 2.0,所以选择用Anaconda,顺便记录下环境配置。Anaconda 最大的好处就是可以去选择不同的Python版本和不同的依赖去跑在完全隔离的环境中,每个单独运行互不影响,还可以直接打包随走随用,不需要随时可以删除掉,很是方便,对于搭配Pycharm也是极佳。...原创 2019-11-21 18:51:15 · 2229 阅读 · 0 评论 -
AttributeError: module 'tensorflow' has no attribute 'Session' 错误
在使用TensorFlow 2.0最新版本时报错: AttributeError: module 'tensorflow' has no attribute 'Session'原因其实并不是不是安装错误,是因为在新的Tensorflow 2.0版本中已经移除了Session这一模块。解决方法运行下面代码替换tf.Session()即可>>> tf.compat....原创 2019-11-21 13:56:35 · 1607 阅读 · 0 评论 -
树莓派安装TensorFlow遇到的问题
树莓派想跑个TensorFlow,结果发现各种安装包错误,各种解决,下面是一些问题的解决和解决方法。问题一:ERROR: Cannot uninstall ‘wrapt’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which wou...原创 2019-11-10 03:38:57 · 1103 阅读 · 0 评论