数据下载百度网盘链接
- caltech256数据集
链接: https://pan.baidu.com/s/1UzTW15749pV91pfmfxafFA 密码: 6l1e - minc-2500数据集
链接: https://pan.baidu.com/s/1q49b4pqIv8f5kHMmF-t-oA 密码: egng - food101数据集
链接: https://pan.baidu.com/s/1_QVIarr-TI1V9AJ8YxLUeA 密码: a1ai - flower_photos数据集
链接: https://pan.baidu.com/s/1nhs6ESZ3OZEzXzAN_C8UnQ 密码: egi2
预训练模型下载百度网盘链接
- VGG16
链接: https://pan.baidu.com/s/14G8xDie1Yk4JsZutT5sLWw 密码: m4as
链接: https://pan.baidu.com/s/1nw47gcnLkzoBdDigRNthTQ 密码: nlbf
链接: https://pan.baidu.com/s/1iz9cvIhWkf0asuFVgovNRA 密码: bah6
conda相关
虚拟环境配置文件导出
conda env export > conda-gpu.yml
pip freeze > conda-gpu.txt
通过配置文件方式创建虚拟环境
conda env create -f conda-gpu.yml
pip install -r conda-gpu.txt
克隆已有虚拟环境
conda create --name test --clone base
创建和删除虚拟环境
conda create -n tf1.14 python=3.6
conda remove --name tf1.14 --all
安装cuda
conda install cudatoolkit=10.1.243 cudnn
conda install cudatoolkit=10.0.130 cudnn
显卡设置
export CUDA_VISIBLE_DEVICES=0
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
except RuntimeError as e:
print(e)
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
Linux指令
后台运行任务
nohup python train.py > train_log 2> error_log &
查看python解释器
!which python
下载Miniconda-py36
wget https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh
文件解压
unzip filename.zip -d /path/to/directory
Docker相关
共享本地文件夹和container内部
sudo nvidia-docker run -it --name tf -p 8888:8888 -v /home/mao/data:/home/mao/data 413b9533f92a
Jupyter相关
查看notebook的内核
jupyter kernelspec list
jupyter kernelspec remove kernelName
添加notebook的内核步骤
1. conda create -n tf2.2 python=3.6 ipykernel
2. source activate tf2.2
3. conda install -n tf2.2 ipykernel
4. python -m ipykernel install --user --name tf2.2
NBextension安装
pip install jupyter_contrib_nbextensions jupyter_nbextensions_configurator autopep8
jupyter contrib nbextension install --user
jupyter nbextensions_configurator enable --user
NNI
运行一个实验
nnictl create --config config.yml
停止所有运行中的实验
nnictl stop --all
更新实验的搜索空间
nnictl update
删除所有实验
nnictl experiment delete --all
导出实验数据
nnictl experiment export
MLFlow
开启日志UI界面
mlflow ui
分卷压缩
合并数据集
1. zip -F TongeImageDataset.zip --out file-large.zip
2. unzip file-large.zip
3. mogrify -format png *.bmp