Image Classification Based on Resnet18
1. Configure Docker development environment
Refer to here. After configuring the Docker development environment, return here to continue the next step.
警告
If you are using a configured Docker development environment, please make sure to follow the Docker configuration tutorial to execute command source ./tpu-mlir/envsetup.sh
after starting Docker, otherwise errors may occur in subsequent steps.
2. Prepare the working directory in Docker
Create and enter the resnet18
working directory, note that it is a directory at the same level as tpu-mlir
.
# mkdir resnet18 && cd resnet18
Get the original model
# wget https://github.com/onnx/models/raw/main/validated/vision/classification/resnet/model/resnet18-v1-7.tar.gz
Extract resnet18-v1-7.tar.gz
# tar -zxvf resnet18-v1-7.tar.gz