Use the online server (AutoDL) to train the model

1. Prepare the dataset and network code

1. Dataset

①Please put the dataset in a folder named dataset; ②Please compress the dataset, with the suffix .zip; ③Click OK
insert image description here

2. Code

①Please put the code in the folder named coad; ②Please compress the code, and the suffix is ​​.zip; ③Click OK
insert image description here

Below we have two tarballs.
insert image description here

2. Use the AutoDL server

1. AutoDL address

https://www.autodl.com/register?code=e0ab7117-bd25-4480-8184-5953048a2502

2. Open AutoDL (registration does not explain)

①Open the interface.
insert image description here

② Registered users will have a 10 yuan voucher, which is enough for a period of time.
insert image description here

③Choose the GPU you want to use. For the sake of explanation, choose the most affordable GPU—TITAN Xp, and click 1 card to rent it.
insert image description here

④The following interface will appear, click on the base image.
insert image description here

⑤ Choose the deep learning framework you need, I choose PyTorch --> 1.10.0 --> 3.8 (ubuntu20.04) --> 11.3.
insert image description here

⑥ Click Create Now.
insert image description here

⑦Click on JupyterLab
insert image description here

⑧Wait for a while, click Terminal.
insert image description here

3. Using AutoDL

①Drag the data set and code into AutoDL.
insert image description here

②Click upload, the data set may wait for a while, please wait patiently.
insert image description here

③When the progress bar is full, the upload is successful.
insert image description here

④Download the installation tool.

Enter the command: curl -L -o /usr/bin/arc http://autodl-public.ks3-cn-beijing.ksyun.com/tool/arc && chmod +x /usr/bin/arc
insert image description here

⑤ Unzip.

Enter the command to decompress the code: arc decompress coad.zip
insert image description here

Enter the command to decompress the dataset: arc decompress dataset.zip
insert image description here

3. Training model

1. Switch to the coad folder

Command: cd coad
will switch to the coad folder.
insert image description here

2. Training model

Command: python model.py
insert image description here

3. Path

Be sure to pay attention to the path of the dataset.
You can install the path of the dataset in train.py to place the dataset.

4. shutdown

insert image description here

5. Compression

If you want to compress all the files in the current directory, you can use the wildcard *, that is, the command is zip -r compressed package name *. You can also use *.txt to compress all files with the specified .txt suffix.

zip -r archive name *

Guess you like

Origin blog.csdn.net/m0_68382801/article/details/127624858