# US 2024/0202590 A1 · Electronic device and operation method of electronic device for performing calculation using artificial intelligence model

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

- Number: US 2024/0202590 A1
- Document ID: US20240202590A1
- Status: Published application
- Kind: A1
- Application number: 18/415,946
- Filed: 2024-01-18
- Published: 2024-06-20
- Earliest claimed: 2022-08-23
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Junhyuk LEE; Hyunbin PARK; Seungjin YANG
- Web page: https://patentgrep.com/patent/US20240202590A1

## CPC

- G06N 3/048: Activation functions
- G06N 20/00: Machine learning
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/063: using electronic means
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

According to certain embodiments, an electronic device comprises: a processor and memory storing instructions; and wherein the instructions, when executed by the processor, further cause the electronic device to: load and compile an artificial intelligence model stored in the memory; determine whether the compiled artificial intelligence model includes a first-type activation function; when the first-type activation function is included in the compiled artificial intelligence model, skip a calculation with respect to a designated value when the designated value exists in a feature map and calculate a value to be calculated subsequent to the designated value; and when the first-type activation function is not included in the compiled artificial intelligence model, perform a calculation with respect to input values of the feature map.

## Claims

### Claim 1

An electronic device comprising:
a processor; and
memory storing instructions,
wherein the instructions, when executed by the processor, cause the electronic device to:
load and compile an artificial intelligence model stored in the memory;
determine whether the compiled artificial intelligence model includes a first-type activation function;
when the first-type activation function is included in the compiled artificial intelligence model, skip a calculation with respect to a designated value when the designated value exists in a feature map and calculate a value to be calculated subsequent to the designated value; and
when the first-type activation function is not included in the compiled artificial intelligence model, perform a calculation with respect to input values of the feature map.

### Claim 2 (depends on 1)

The electronic device of claim 1, wherein the first-type activation function is a Rectified Linear Unit (ReLU) function.

### Claim 3 (depends on 2)

The electronic device of claim 2, wherein the instructions, when executed by the processor, further cause the electronic device to:
when the first-type activation function is included in the compiled artificial intelligence model, compress a feature map by excluding the designated value when the designated value exists in the feature map; and
when the first-type activation function is not included in the compiled artificial intelligence model, deactivate the compress the feature map.

### Claim 4 (depends on 2)

The electronic device of claim 2, wherein skipping the calculation with respect to the designated value and calculating the value to be calculated subsequent to the designated value includes performing a zero-skipping function that skips a calculation for “0” if “0” exists in the feature map.

### Claim 5 (depends on 3)

The electronic device of claim 3, wherein compressing the feature map is a function of extracting a value excluding a value of “0” from the feature map and compressing the feature map based on the extracted value.

### Claim 6 (depends on 4)

The electronic device of claim 4, wherein the instructions, when executed by the processor, further cause the electronic device to:
in response to calculate the value, when a feature map corresponding to a result value of a previous hidden layer of the artificial intelligence model is used as an input value and “0” exists in the feature map, skip a calculation with respect to “0” and perform a calculation with respect to a value other than “0” to be calculated next; and
perform calculation with respect to a multiply accumulate calculation (MAC) result.

### Claim 7 (depends on 5)

The electronic device of claim 5, wherein the instructions, when executed by the processor, further cause the electronic device to:
in response to compressing the feature map, compress a feature map with values other than “0” from the feature map corresponding to an output value of a hidden layer after a calculation of the hidden layer of the artificial intelligence model is completed; and
store the compressed feature map in the memory.

### Claim 8

An operation method of an electronic device, the method comprising:
loading and compiling an artificial intelligence model stored in a memory;
determining whether the compiled artificial intelligence model includes a first-type activation function;
when the first-type activation function is included in the compiled artificial intelligence model, skipping a calculation with respect to a designated value when the designated value exists in a feature map and calculating a value to be calculated subsequent to the designated value; and
when the first-type activation function is not included in the combined artificial intelligence model, performing a calculation with respect to input values of the feature map.

### Claim 9 (depends on 8)

The method of claim 8, wherein the first-type activation function is a Rectified Linear Unit (ReLU) function.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
when the first-type activation function is included in the compiled artificial intelligence model, compressing a feature map by excluding the designated value when the designated value exists in a feature map; and
when the first-type activation function is not included in the compiled artificial intelligence model, deactivating the compress the feature map.

### Claim 11 (depends on 9)

The method of claim 9, wherein skipping the calculation with respect to the designated value and calculating the value to be calculated subsequent to the designated value includes performing a zero-skipping function that skips a calculation for “0” if “0” exists in the feature map.

### Claim 12 (depends on 10)

The method of claim 10, wherein compressing the feature map is a function of extracting a value excluding a value of “0” from the feature map and compressing the feature map based on the extracted value.

### Claim 13 (depends on 11)

The method of claim 11, further comprising:
in response to calculating the value, skipping a calculation with respect to “0” and performing a calculation with respect to a value other than “0” to be calculated next in case that a feature map corresponding to a result value of a previous hidden layer of the artificial intelligence model is used as an input value and “0” exists in the feature map; and
performing a calculation with respect to a multiply accumulate calculation (MAC) calculation result.

### Claim 14 (depends on 12)

The method of claim 12, further comprising:
in response to compressing the feature map, compressing a feature map with values other than “0” from the feature map corresponding to an output value of a hidden layer after a calculation of the hidden layer of the artificial intelligence model is completed; and
storing the compressed feature map in the memory.

### Claim 15

A non-transitory computer-readable medium storing a plurality of instructions executable by a processor, wherein execution of the plurality of instruction by the processor causes the processor to perform a plurality of operations comprising:
loading and compiling an artificial intelligence model stored in a memory;
determining whether the compiled artificial intelligence model includes a first-type activation function;
when the first-type activation function is included in the compiled artificial intelligence model, skipping a calculation with respect to a designated value when the designated value exists in a feature map and calculating a value to be calculated subsequent to the designated value; and
when the first-type activation function is not included in the compiled artificial intelligence model, performing a calculation with respect to input values of the feature map.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the first-type activation function is a Rectified Linear Unit (ReLU) function.

### Claim 17 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein the plurality of operations further comprises:
when the first-type activation function is included in the compiled artificial intelligence model, compressing a feature map by excluding the designated value when the designated value exists in a feature map; and
when the first-type activation function is not included in the compiled artificial intelligence model, deactivating the compress the feature map.

### Claim 18 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein skipping the calculation with respect to the designated value and calculating the value to be calculated subsequent to the designated value includes performing a zero-skipping function that skips a calculation for “0” if “0” exists in the feature map.

### Claim 19 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein compressing the feature map is a function of extracting a value excluding a value of “0” from the feature map and compressing the feature map based on the extracted value.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19, the plurality of operations further comprises:
in response to compressing the feature map, compressing a feature map with values other than “0” from the feature map corresponding to an output value of a hidden layer after a calculation of the hidden layer of the artificial intelligence model is completed; and
storing the compressed feature map in the memory.
