上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 28 下一页
摘要: 1-删除模型变量 del model_define 2-清空CUDA cache torch.cuda.empty_cache() 3-步骤2(异步)需要一定时间,设置时延 time.sleep(5) 完整代码如下: del styler torch.cud... 阅读全文
posted @ 2022-11-13 22:36 dlhl 阅读(398) 评论(0) 推荐(0)
摘要: try: var_name except NameError: var_name = initialize 阅读全文
posted @ 2022-11-13 22:36 dlhl 阅读(62) 评论(0) 推荐(0)
摘要: sudo vim /etc/modprobe.d/blacklist-nouveau.conf#add the content blow blacklist nouveauoptions nouveau modeset=0sudo update-initra... 阅读全文
posted @ 2022-11-13 22:36 dlhl 阅读(92) 评论(0) 推荐(0)
摘要: # bytes object b = b"example"# str object s = "example" # str to bytes sb = bytes(s, encoding = "utf8") # bytes to str bs = ... 阅读全文
posted @ 2022-11-13 22:36 dlhl 阅读(97) 评论(0) 推荐(0)
摘要: 1)比较新的cuDNN,使用命令: cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2 2)比较旧的cuDNN,使用命令: cat /usr/local/cuda/include/cudnn.h | grep CU... 阅读全文
posted @ 2022-11-13 22:36 dlhl 阅读(795) 评论(0) 推荐(0)
摘要: Fermi (CUDA 3.2 until CUDA 8) (deprecated from CUDA 9): SM20 or SM_20, compute_30 – Older cards such as GeForce 400, 500, 600, G... 阅读全文
posted @ 2022-11-13 22:36 dlhl 阅读(1280) 评论(0) 推荐(0)
摘要: 安装命令行如下: sudo apt update && sudo apt upgrade sudo apt install python-numpy python-scipy python-matplotlib ipython ipython-notebook... 阅读全文
posted @ 2022-11-13 22:36 dlhl 阅读(103) 评论(0) 推荐(0)
摘要: jupyter的调试是通过python自带的pdb库来实现的。 温馨提示:图片点击可放大 下面讲一下在notebook中如何进行调试 1.首先需要import pdb 2.然后在import后写入语句: pdb.set_trace() 这个的作用是输入调试器。... 阅读全文
posted @ 2022-11-13 22:36 dlhl 阅读(887) 评论(0) 推荐(0)
摘要: Numpy库(以下运行结果均在#注释后) 为pyhton提供了高性能的多维数组对象,以及用于处理这些阵列的工具, 1.1 矩阵(Arrays) 创建矩阵 #创建一个3行1列的矩阵a = np.array([1, 2, 3]) #输出矩阵的维度,结果为(3... 阅读全文
posted @ 2022-11-13 22:36 dlhl 阅读(291) 评论(0) 推荐(0)
摘要: atplotlib 是一个 Python 的 2D绘图库,它以各种硬拷贝格式和跨平台的交互式环境生成出版质量级别的图形 。通过 Matplotlib,开发者可以仅需要几行代码,便可以生成绘图,直方图,功率谱,条形图,错误图,散点图等。 1.1 Matplotl... 阅读全文
posted @ 2022-11-13 22:36 dlhl 阅读(275) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 28 下一页