CPC H03M 7/6011 (2013.01) [G06N 3/08 (2013.01); H03M 7/6005 (2013.01); H03M 7/70 (2013.01); H03M 7/46 (2013.01)] | 14 Claims |
1. A weight data compression method of compressing ternary weight data used in a neural network, the weight data compression method comprising:
generating a 4-bit data string by dividing the ternary weight data into data items each having 4 bits, the ternary weight data being a data string of data items each having any one of three 2-bit values, the 4-bit data string being a data string of 4-bit data items each expressed as any one of nine 4-bit values; and
generating first compressed data including a first flag value string and a first non-zero value string by generating the first flag value string and the first non-zero value string, the first flag value string being generated by assigning one of 0 and 1 as a first flag value of a 1-bit flag to a 4-bit data item 0000 and assigning an other of 0 and 1 as a second flag of the 1-bit flag to a 4-bit data item other than 0000 among the 4-bit data items in the 4-bit data string, the first non-zero value string being generated by converting the 4-bit data item other than 0000 into a 3-bit data item having any one of eight 3-bit values.
|