1. 中文
    1. 在eval.py中添加gpu_allow_growth参数
    2. 在train.py中添加gpu_allow_growth参数
    3. 在train.py中添加max_to_keep参数
  2. English
    1. Add gpu_allow_growth parameter in eval.py
    2. Add gpu_allow_growth parameter in train.py
    3. Add max_to_keep parameter in train.py

代码仓库:https://github.com/lijiancheng0614/tensorflow_deeplab

修改TensorFlow DeepLab,添加一些方便使用或新的功能。

中文

使用方法:

1
2
3
4
git clone https://github.com/lijiancheng0614/tensorflow_deeplab deeplab
export PYTHONPATH=$PYTHONPATH:`pwd`
git clone https://github.com/tensorflow/models.git
export PYTHONPATH=$PYTHONPATH:`pwd`/models/research/slim

eval.py中添加gpu_allow_growth参数

eval.py中添加gpu_allow_growth参数,默认为True,即不占用GPU全部内存,而是动态申请显存。

修改文件:

  • eval.py

train.py中添加gpu_allow_growth参数

train.py中添加gpu_allow_growth参数,默认为True,即不占用GPU全部内存,而是动态申请显存。

修改文件:

  • train.py

train.py中添加max_to_keep参数

train.py中添加max_to_keep参数,默认为5,即保留最后5个checkpoint。如为0则保留所有的checkpoint。

修改文件:

  • train.py

English

Usage:

1
2
3
4
git clone https://github.com/lijiancheng0614/tensorflow_deeplab deeplab
export PYTHONPATH=$PYTHONPATH:`pwd`
git clone https://github.com/tensorflow/models.git
export PYTHONPATH=$PYTHONPATH:`pwd`/models/research/slim

Add gpu_allow_growth parameter in eval.py

Add gpu_allow_growth parameter in eval.py, default value is True which means attempting to allocate only as much GPU memory based on runtime allocations.

Modified files:

  • eval.py

  • evaluator.py

  • eval_util.py

Add gpu_allow_growth parameter in train.py

Add gpu_allow_growth parameter in train.py, default value is True which means attempting to allocate only as much GPU memory based on runtime allocations.

Modified files:

  • train.py

  • trainer.py

Add max_to_keep parameter in train.py

Add max_to_keep parameter in train.py, default value is 5 which means the 5 most recent checkpoint files are kept. If 0, all checkpoint files are kept.

Modified files:

  • train.py