- 博客(6)
- 收藏
- 关注
原创 conda安装虚拟环境时发生ClobberError
尝试运行conda clean --all,然后再运行安装命令。ClobberError: The package 'defaults/linux-64::numpy-base-1.21.2-py38h79a1101_0' cannot be installed due to a path collision for 'lib/python3.8/site-packages/numpy/version.py'.This path already exists in the target pref.
2021-11-17 16:18:19
12607
5
原创 tf.config:GPU 的使用与分配
tf.config:GPU 的使用与分配(转载) 指定当前程序使用的 GPU首先,通过tf.config.list_physical_devices,我们可以获得当前主机上某种特定运算设备类型(如GPU或CPU)的列表,例如,在一台具有 4 块 GPU 和一个 CPU 的工作站上运行以下代码:gpus = tf.config.list_physical_devices(device_type='GPU')cpus = tf.config.list_physical_devices...
2021-03-11 10:43:31
1495
原创 Python笔记
Python遍历目录中所有文件os.walk()os.walk(path) 返回包含(dir,folder,file)三种信息的generator,其中file为文件名,dir为file的目录、folder为dir下的子目录。对于每一个file,都有对应的dir、folder(多个),所以循环获取的时候for i in file就可以取到想要的数据了。import osfile_list = []def getfilelist(rlist,path) for dir,folder,fil
2020-12-15 11:12:46
186
原创 解决Sublime Text 3在GBK编码下的中文乱码问题
Sublime Text 3 编辑器默认不支持GBK的编码格式,因此打开GBK的代码文件,如果里面有中文的话,就会乱码。Package Control包,是一个用来安装其他插件的包,要装其他插件,首先要先装这个包才行。按ctrl+~快捷键,调出一个小文本款,然后粘贴以下代码:import urllib.request,os,hashlib; h = '7183a2d3e96f11eea...
2019-01-15 15:49:02
681
翻译 Installing previous versions of PyTorch
Installing previous versions of PyTorchWe’d prefer you install the latest version, but old binaries and installation instructions are provided below for your convenience.Via condaTo install a pr...
2018-11-03 21:00:44
355
原创 使用conda,pip卸载Pytorch,查看当前pytorch版本
卸载Pytorch1、使用conda卸载Pytorchconda uninstall pytorchconda uninstall libtorch2、使用pip卸载Pytorchpip uninstall torch如何查看当前pytorch版本有时候我们想要知道当前的pytorch版本,我们可以使用如下代码打印出当前的版本:进入Pythonimport ...
2018-11-03 20:59:39
25807
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人