All Products
Search
Document Center

Platform For AI:Submit a single-node PyTorch transfer learning job

Last Updated:Jun 04, 2026

Run an offline PyTorch transfer learning job with Deep Learning Containers (DLC).

Step 1: Get the data

The sample data is available at a public URL (Download the data) and requires no preparation.

Step 2: Get the training code

The training code is available at a public URL (Download the training code). No development required.

Step 3: Create a job

  1. Go to the Create Job page.

    1. Log on to the PAI console. In the top navigation bar, select a region. In the upper-right corner, select a workspace, and click Go to DLC.

    2. On the Deep Learning Containers (DLC) page, click Create Task.

  2. On the Create Task page, configure the following parameters. Use default values for other settings.

    image

    Parameter

    Description

    Basic Information

    Task Name

    Enter the job name, such as torch-sample.

    Environment Information

    Node Image

    Click Alibaba Cloud Image and select a PyTorch image.

    Datasets

    Mount a custom dataset to save training results. This example uses an OSS dataset. Click Custom Dataset and configure the following parameters:

    Start Command

    Enter the following command to download the data and code, run the training job, verify the output, and copy results to the mounted directory.

    wget https://pai-public-data.oss-cn-beijing.aliyuncs.com/hol-pytorch-transfer-cv/data.tar.gz && tar -xf ./data.tar.gz && mv ./hymenoptera_data/ ./input && mkdir output && wget https://pai-public-data.oss-cn-beijing.aliyuncs.com/hol-pytorch-transfer-cv/main.py && python main.py -i ./input -o ./output && ls ./output && cp -r ./output /mnt/data

    Resource Information

    Resource Source

    Select Public Resources.

    Framework

    Select PyTorch.

    Task Resources

    • Nodes: Set to 1.

    • Instance Type: Click image and select an instance type, such as GPU > ecs.gn6e-c12g1.3xlarge. If this instance type is unavailable in your region, switch to a supported region. Deep Learning Containers (DLC) lists pay-as-you-go regions.

  3. Click OK.

    You are automatically redirected to the Deep Learning Containers (DLC) page.

Step 4: View job details and logs

  1. On the Deep Learning Containers (DLC) page, click the job name.

  2. On the job overview page, view Basic Information and Resource Information.

  3. Scroll down to the Instance section. In the Actions column, click Log.image

  4. Output files are stored in the mounted dataset's file system. The following figure shows example output in an OSS bucket. Your results may vary.image