Commit 05631eec authored by liangjing's avatar liangjing
Browse files

version 1

parent 7e0391d9
#!/bin/bash
export MIOPEN_FIND_MODE=1
export HIP_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
export HSA_FORCE_FINE_GRAIN_PCIE=1
export NCCL_P2P_LEVEL=5
export TF_FORCE_GPU_ALLOW_GROWTH="true"
python3 ./resnet_ctl_imagenet_main.py --data_dir=/data/tf-imagenet/imagenet --num_gpus=8 --use_tf_keras_layers=False --distribution_strategy=mirrored --all_reduce_alg=nccl --optimizer=LARS --report_accuracy_metrics=true --base_learning_rate=4.9 --batch_size=2496 --datasets_num_private_threads=32 --dtype=fp16 --num_accumulation_steps=1 --enable_device_warmup --enable_eager --epochs_between_evals=4 --eval_dataset_cache --eval_offset_epochs=3 --eval_prefetch_batchs=192 --label_smoothing=0.1 --log_steps=125 --lr_schedule=polynomial --optimizer=LARS --report_accuracy_metrics --single_l2_loss_op --steps_per_loop=514 --tf_gpu_thread_mode=gpu_private --train_epochs=70 --training_dataset_cache --training_prefetch_batchs=128 --verbosity=0 --warmup_epochs=5 --weight_decay=0.0002 --test_randomize_ordering_seed 1
# ResNet50(Residual Network with 50-layer)
## 模型介绍
ResNet50是一种用于图像识别的深度神经网络模型。
## 模型结构
ResNet50网络模型由一系列卷积层、池化层、全局平均池化层和全连接层组成。该模型的特殊之处在于它包含多个残差块,每个残差块由多个卷积层和跳跃连接组成。
在ResNet50中,输入图像通过一系列卷积层和池化层进行特征提取,然后通过多个残差块进行深度特征学习。每个残差块包含多个卷积层和跳跃连接,跳跃连接允许信息在残差块内和残差块之间的传递,从而解决了深度神经网络中出现的梯度消失问题。最后,全局平均池化层将特征映射到一个固定长度的向量,该向量再通过全连接层进行分类或回归等任务。
## 数据集
需使用ImageNET数据集,下载地址:http://image-net.org/challenges/LSVRC/2012/2012-downloads (require an account)
具体处理方式可详见:https://github.com/mlcommons/training/tree/master/image_classification
## 训练
### 环境配置
提供[光源](https://www.sourcefind.cn/#/service-details)拉取的训练的docker镜像:
* 训练镜像:
python依赖安装:
pip install -r requirement.txt
### 训练
训练命令:
bash 8dcu_multi.sh >& output.log &
### 预训练模型
在本目录下我们提供了一个预训练模型如下:
mlperf_resnet50
├── checkpoint
├── ckpt-0.data-00000-of-00001
├── ckpt-0.index
├── ckpt-500.data-00000-of-00001
├── ckpt-500.index
## 性能和准确率数据
数据采用ImageNet Data,使用的加速卡是DCU Z100L,采用单机8卡规模测试结果如下
| 测试平台 | Accuacy(%) | Speed(s) |
| :------: | :--------: | :------: |
| Z100L | 75.9 | xxx |
## 历史版本
* https://developer.hpccube.com/codes/modelzoo/mlperf_resnet50
## 参考
* https://mlcommons.org/en/
* https://github.com/mlcommons
\ No newline at end of file
model_checkpoint_path: "ckpt-500"
all_model_checkpoint_paths: "ckpt-0"
all_model_checkpoint_paths: "ckpt-500"
all_model_checkpoint_timestamps: 1652335023.338002
all_model_checkpoint_timestamps: 1652336122.617568
last_preserved_timestamp: 1652335021.4878714
File added
File added
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment