# US 2022/0036241 A1 · Method, device and storage medium for training a deep learning framework

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0036241 A1
- Document ID: US20220036241A1
- Status: Published application
- Kind: A1
- Application number: 17/501,003
- Filed: 2021-10-14
- Published: 2022-02-03
- Earliest claimed: 2021-03-10
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Tianjian He; Dianhai Yu; Zhihua Wu; Daxiang Dong; Yanjun Ma
- Web page: https://patentgrep.com/patent/US20220036241A1

## CPC

- G06N 3/08: Learning methods
- G06N 20/00: Machine learning
- G06F 9/4843: {by program, e.g. task dispatcher, supervisor, operating system}
- G06F 9/485: {Task life-cycle, e.g. stopping, restarting, resuming execution (G06F9/4881 takes precedence)}
- G06F 9/5066: {Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs (mappping at compile time, see G06F8/451)}
- G06F 9/52: Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06N 3/098: Distributed learning, e.g. federated learning
- G06F 2209/485: Resource constraint
- G06F 2209/5022: Workload threshold
- G06F 2209/503: Resource availability
- G06N 3/045: Combinations of networks
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure discloses a method, an apparatus and a storage medium for training a deep learning framework, and relates to the artificial intelligence field such as deep learning and big data processing. The specific implementation solution is: acquiring at least one task node in a current task node cluster, that meets a preset opening condition when a target task meets a training start condition; judging whether a number of nodes of the at least one task node is greater than or equal to a preset number; synchronously training the deep learning framework of the target task by the at least one task node according to sample data if the number of nodes is greater than the preset number; and acquiring a synchronously trained target deep learning framework when the target task meets a training completion condition.

## Claims

### Claim 1

A method for training a deep learning framework, comprising:
acquiring at least one task node in a current task node cluster, that meets a preset opening condition when a target task meets a training start condition;
judging whether a number of nodes of the at least one task node is greater than a preset number;
synchronously training the deep learning framework of the target task by the at least one task node according to sample data when the number of nodes is greater than the preset number; and
acquiring a synchronously trained target deep learning framework when the target task meets a training completion condition.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the acquiring the at least one task node in the current task node cluster, that meets the preset opening condition, comprises:
determining a node state of each node in the current task node cluster; and
determining a node, the node state of which is an idle state condition, as the at least one task node that meets the preset opening condition.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the acquiring the at least one task node in the current task node cluster, that meets the preset opening condition, comprises:
determining an amount of idle resources of each node in the current task node cluster; and
determining a node, the amount of idle resources of which is greater than a preset threshold condition, as the at least one task node that meets the preset opening condition.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the synchronously training the deep learning framework of the target task by the at least one task node according to the sample data comprises:
training the deep learning framework in each task node;
reading framework parameters of the deep learning framework in each task node in each period according to a preset period;
determining a first average value, wherein the first average value is an average value of the framework parameters of all task nodes; and
synchronizing the deep learning framework in each task node according to the first average value.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the synchronously training the deep learning framework of the target task by the at least one task node according to the sample data comprises:
monitoring whether the current task node cluster contains other task nodes that meet the preset opening condition; and
synchronously training the deep learning framework of the target task by the other task nodes and the at least one task node according to the sample data when the other task nodes exist.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the synchronously training the deep learning framework of the target task by the other task nodes and the at least one task node according to the sample data comprises:
acquiring current framework parameters of the deep learning framework in each task node of the at least one task node;
determining a second average value, wherein the second average value is an average value of all the current framework parameters; and
updating the framework parameters of the deep learning framework by the other task nodes and the at least one task node according to the second average value.

### Claim 7 (depends on 1)

The method according to claim 1, wherein when the target task meets the training start condition, the method comprises:
monitoring a priority level of a task to be executed in the current task node cluster; and
determining that the target task meets the training start condition when the priority level is less than a preset level.

### Claim 8

An electronic device, comprising:
at least one processor; and
a memory communicatively connected with the at least one processor; wherein,
instructions executable by the at least one processor are stored in the memory, and the instructions are executed by the at least one processor, so that the at least one processor is configured to:
acquire at least one task node in a current task node cluster, that meets a preset opening condition when a target task meets a training start condition;
judge whether a number of nodes of the at least one task node is greater than a preset number;
synchronously train the deep learning framework of the target task by the at least one task node according to sample data when the number of nodes is greater than the preset number; and
acquire a synchronously trained target deep learning framework when the target task meets a training completion condition.

### Claim 9 (depends on 8)

The electronic device according to claim 8, wherein the instructions are executed by the at least one processor, so that the at least one processor is configured to:
determine a node state of each node in the current task node cluster; and
determine a node, the node state of which is an idle state condition, as the at least one task node that meets the preset opening condition.

### Claim 10 (depends on 8)

The electronic device according to claim 8, wherein the instructions are executed by the at least one processor, so that the at least one processor is configured to:
determine an amount of idle resources of each node in the current task node cluster; and
determine a node, the amount of idle resources of which is greater than a preset threshold condition, as the at least one task node that meets the preset opening condition.

### Claim 11 (depends on 8)

The electronic device according to claim 8, wherein the instructions are executed by the at least one processor, so that the at least one processor is configured to:
train the deep learning framework in each task node;
read framework parameters of the deep learning framework in each task node in each period according to a preset period;
determine a first average value, wherein the first average value is an average value of the framework parameters of all task nodes; and
synchronize the deep learning framework in each task node according to the first average value.

### Claim 12 (depends on 8)

The electronic device according to claim 8, wherein the instructions are executed by the at least one processor, so that the at least one processor is configured to:
monitor whether the current task node cluster contains other task nodes that meet the preset opening condition; and
synchronously train the deep learning framework of the target task by the other task nodes and the at least one task node according to the sample data when the other task nodes exist.

### Claim 13 (depends on 5)

The electronic device according to claim 5, wherein the instructions are executed by the at least one processor, so that the at least one processor is configured to:
acquire current framework parameters of the deep learning framework in each task node of the at least one task node;
determine a second average value, wherein the second average value is an average value of all the current framework parameters; and
update the framework parameters of the deep learning framework by the other task nodes and the at least one task node according to the second average value.

### Claim 14 (depends on 8)

The electronic device according to claim 8, wherein the instructions are executed by the at least one processor, so that the at least one processor is configured to:
monitor a priority level of a task to be executed in the current task node cluster; and
determine that the target task meets the training start condition when the priority level is less than a preset level.

### Claim 15

A non-transitory computer-readable storage medium, in which computer instructions are stored, wherein the computer instructions are configured to cause a computer execute a method for training a deep learning framework, the method comprising:
acquiring at least one task node in a current task node cluster, that meets a preset opening condition when a target task meets a training start condition;
judging whether a number of nodes of the at least one task node is greater than a preset number;
synchronously training the deep learning framework of the target task by the at least one task node according to sample data when the number of nodes is greater than the preset number; and
acquiring a synchronously trained target deep learning framework when the target task meets a training completion condition.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the acquiring the at least one task node in the current task node cluster, that meets the preset opening condition, comprises:
determining a node state of each node in the current task node cluster; and
determining a node, the node state of which is an idle state condition, as the at least one task node that meets the preset opening condition.

### Claim 17 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the acquiring the at least one task node in the current task node cluster, that meets the preset opening condition, comprises:
determining an amount of idle resources of each node in the current task node cluster; and
determining a node, the amount of idle resources of which is greater than a preset threshold condition, as the at least one task node that meets the preset opening condition.

### Claim 18 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the synchronously training the deep learning framework of the target task by the at least one task node according to the sample data comprises:
training the deep learning framework in each task node;
reading framework parameters of the deep learning framework in each task node in each period according to a preset period;
determining a first average value, wherein the first average value is an average value of the framework parameters of all task nodes; and
synchronizing the deep learning framework in each task node according to the first average value.

### Claim 19 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the synchronously training the deep learning framework of the target task by the at least one task node according to the sample data comprises:
monitoring whether the current task node cluster contains other task nodes that meet the preset opening condition; and
synchronously training the deep learning framework of the target task by the other task nodes and the at least one task node according to the sample data when the other task nodes exist.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium according to claim 19, wherein the synchronously training the deep learning framework of the target task by the other task nodes and the at least one task node according to the sample data comprises:
acquiring current framework parameters of the deep learning framework in each task node of the at least one task node;
determining a second average value, wherein the second average value is an average value of all the current framework parameters; and
updating the framework parameters of the deep learning framework by the other task nodes and the at least one task node according to the second average value.
