python
zengdm46
这个作者很懒,什么都没留下…
展开
-
ubuntu下查看cuda及cudnn版本常用命令
查看cuda版本cat /usr/local/cuda/version.txt查看cudnn版本cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2原创 2020-05-13 11:26:48 · 449 阅读 · 0 评论 -
pytorch .pth模型转tensorflow .pb模型
训练好的pytorch模型如何转化为tensorflow的pb模型?本人初步使用的是onnx框架: pytorch ---> onnx ----> tensorflow使用onnx转pb后,加载pb模型时出现in __call__ raise ValueError("callback %s is not found" % token) ValueError: callbac...原创 2020-01-19 17:21:00 · 15327 阅读 · 35 评论 -
python-cannot connect to X server
ubuntu下运行python代码出现cannot connect to X server,需要关闭显示图像界面的代码,检查代码是否出现cv2.show()等show原创 2019-11-11 15:53:51 · 286 阅读 · 0 评论 -
每日一道python题(python数据结构课后习题(第一章1-4题))
python入门级小白,仅用来自我学习的,写的不恰当的地方请多指教。(python3.)1.编写一个程序,以球体的半径(浮点型)作为输入,并并且输出球体的直径,圆周长和表面积import mathr = float(input('请输入球体半径r:'))d = 2*rc= 4*math.pi*r**2v = 4/3*math.pi*r**3print("球体直径为%f\n球体表面积为%f\n球体体...原创 2018-04-20 22:42:37 · 5347 阅读 · 0 评论 -
python 字符串格式化.format()简单使用
1. 字符串类型格式化采用format()方法,使用格式是: <模板字符串>.format<(参数1,参数2,参数3....)>.format()可以链接不同类型的变量或者内容例:"{date}:{number}班的迟到人数占比为{level}% ".format(date="2018-11-28",number=3,level=2)O...原创 2018-11-28 10:43:09 · 267 阅读 · 0 评论 -
Linux/Ubuntu下指定pip install和make install安装路径
在Linux下直接用pip install <安装包名称>,安装包会被安装到home下zzz@zzz-hpc:/mnt/D$ pip install fasttextLooking in indexes: https://pypi.tuna.tsinghua.edu.cn/simpleCollecting fasttext Downloading https://pypi...原创 2018-12-05 16:55:15 · 3728 阅读 · 0 评论 -
Python pip安装镜像失败 opencv-python 已解决
下载镜像翻墙速度慢导致安装失败:问题:安装opencv-python失败root@23c943ed55e4:/workspace# pip install opencv-pythonDEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python...原创 2020-01-20 10:48:15 · 4151 阅读 · 2 评论