![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
机器学习
云百佰
平平淡淡的码农
展开
-
朴素贝叶斯分类算法——商品多分类(代码)
python环境:3.6.8import csvimport jiebadef lst_strip(lst):#去掉多余的空格。如果 a=[' 123','ttt,'vv ','',' '],如何实现a=['123','fuck','cvm'],因为strip()是对字符串操作,现在是一个list L=[] for v in lst: v = str.strip(v) if v: L.append(v) return原创 2021-04-21 18:05:57 · 1774 阅读 · 4 评论 -
报错:CUDA out of memory
报错:RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 2.00 GiB total capacity; 1.27 GiB already allocated; 3.24 MiB free; 135.27 MiB cached)我查了一下发现电脑里面有两个显卡的,默认选择了intel的显卡(即是GPU 0...原创 2021-01-22 14:17:16 · 2446 阅读 · 0 评论 -
关于cuda版本问题
cuda版本选择:查看电脑的驱动版本:驱动和cuda版本对应图:https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.htmlcuda版本下载(使用迅雷下载速度更快):https://developer.nvidia.com/cuda-toolkit-archive...原创 2020-04-30 00:20:34 · 1035 阅读 · 0 评论 -
保存tensorflow模型出现错误OSError: `pydot` failed to call GraphViz.Please install GraphViz
Traceback (most recent call last): File "D:\Python\Python36\lib\site-packages\pydot.py", line 1915, in create working_dir=tmp_dir, File "D:\Python\Python36\lib\site-packages\pydot.py", line 13...原创 2020-04-11 18:45:03 · 233 阅读 · 0 评论