From d41448e77e99e1cdeffbdbe6d28aca4d811957c4 Mon Sep 17 00:00:00 2001 From: majorli Date: Thu, 13 Apr 2023 09:41:34 +0000 Subject: [PATCH] Bugfix: Vgg16 pytorch model requirements not right link #I6SKSW Signed-off-by: majorli --- cv/classification/vgg/pytorch/README.md | 19 ++++++++++++++++++- .../vgg/pytorch/requirements.txt | 3 ++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/cv/classification/vgg/pytorch/README.md b/cv/classification/vgg/pytorch/README.md index 56618b647..dfff6a19b 100644 --- a/cv/classification/vgg/pytorch/README.md +++ b/cv/classification/vgg/pytorch/README.md @@ -3,13 +3,18 @@ VGG is a classical convolutional neural network architecture. It was based on an analysis of how to increase the depth of such networks. The network utilises small 3 x 3 filters. Otherwise the network is characterized by its simplicity: the only other components being pooling layers and a fully connected layer. -## Step 1: Installing +## Step 1: Preparing + +### Install requirements ```bash pip3 install -r requirements.txt ``` + +### Set up dataset path Sign up and login in [imagenet official website](https://www.image-net.org/index.php), then choose 'Download' to download the whole imagenet dataset. Specify `/path/to/imagenet` to your imagenet path in later training process. :beers: Done! + ## Step 2: Training ### Multiple GPUs on one machine Set data path by `export DATA_PATH=/path/to/imagenet`. The following command uses all cards to train: @@ -17,6 +22,18 @@ Set data path by `export DATA_PATH=/path/to/imagenet`. The following command use ```bash bash train_vgg16_amp_dist.sh ``` +Install zlib-1.2.9 if reports "iZLIB_1.2.9 not found" when run train_vgg16_amp_dist.sh + +```bash +wget http://www.zlib.net/fossils/zlib-1.2.9.tar.gz +tar xvf zlib-1.2.9.tar.gz +cd zlib-1.2.9/ +./configure && make install +cd ../ +rm -rf zlib-1.2.9.tar.gz zlib-1.2.9/ +``` + + :beers: Done! diff --git a/cv/classification/vgg/pytorch/requirements.txt b/cv/classification/vgg/pytorch/requirements.txt index 61d5792cb..0f45e7da6 100644 --- a/cv/classification/vgg/pytorch/requirements.txt +++ b/cv/classification/vgg/pytorch/requirements.txt @@ -1,3 +1,4 @@ torch torchvision ---extra-index-url https://developer.download.nvidia.com/compute/redist/ nvidia-dali-cuda102==1.6.0 +--extra-index-url https://developer.download.nvidia.com/compute/redist/ +nvidia-dali-cuda102==1.6.0 -- Gitee