Softmax implementation method based on hardware platforms

A technology of a hardware platform and a calculation method, applied in the field of integrated circuits, can solve the problems such as the difficulty of implementing the Softmax function, reducing the range of the storage parameter value range of the lookup table, and reducing the hardware hardware area.

Active Publication Date: 2018-05-11
NANJING UNIV
View PDF4 Cites 18 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The present invention proposes a kind of design method in order to solve the problem that it is not easy to realize the softmax function calculated by fixed-point numbers on various hardware platforms (including CPLD, FPGA, special-purpose chips, etc.), which can reduce the hardware hardware area and

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Softmax implementation method based on hardware platforms
  • Softmax implementation method based on hardware platforms
  • Softmax implementation method based on hardware platforms

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0041] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.

[0042] figure 1 Show the system block diagram of calculating the Softmax function with the fixed-point number represented by the original code on the hardware platform provided by an embodiment of the present invention, the fixed-point number (highest bit represents sign bit, 4-bit integer, 7 bits wide) of the present embodiment decimal places, the precision i...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an implementation method based on various hardware platforms (such as CPLD, FPGA, special chips) for calculating a softmax function. The softmax function is widely applied to multi-classification tasks, attention models and the like for deep learning, wherein related e-exponent and division calculations need to consume many hardware resources. According to a design method,by conducting mathematical transformation on the function, the e-exponent calculation is simplified to one constant multiplication, one exponential operation of 2 with a fixed input range and one shift operation; n division operations are simplified to one highest nonzero digit detection operation, one reciprocal operation with a fixed input range, one shift operation and n multiplication operations. The exponential and reciprocal operations of 2 are achieved according to a specially-designed lookup table, and the same precision can be achieved with a smaller storage space. The method is usedin the attention models and the like for deep learning, the calculation speed can be greatly increased on the premise of almost not influencing the precision, and the consumption of calculation resources and storage resources is reduced.

Description

technical field [0001] The invention relates to the technical field of integrated circuits, in particular to a softmax calculation method based on a hardware platform and its architecture design. Background technique [0002] The softmax function is widely used in multi-classification tasks and attention models of deep learning. It can map the output of multiple neurons to the (0, 1) interval, and the sum of all items is 1, which can be regarded as a probability. It is often used in machine learning to calculate the proportion of multiple outputs or multiple inputs. In the case of weight. [0003] The e-index calculation and division calculation involved in Softmax consume a lot of hardware resources. The implementation efficiency and resource consumption of deep learning on the hardware platform will be affected by the calculation speed and resource requirements of this function. After a simple transformation of the function, the exponent calculation is replaced by a shif...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F17/15
CPCG06F17/15Y02D10/00
Inventor 王中风王美琪路思远林军
Owner NANJING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products