CPC G06N 3/04 (2013.01) [G06N 3/10 (2013.01)] | 9 Claims |
1. A data processing method, implemented by circuits for implementing functions, comprising:
performing, by the circuits for implementing functions, a forward calculation of a neural network on global data to obtain output data of the forward calculation;
storing, by the circuits for implementing functions, the output data of the forward calculation in a global memory unit, wherein intermediate data is not stored in the global memory unit;
performing, by the circuits for implementing functions, the forward calculation of the neural network on the global data again, to obtain the intermediate data for a reverse calculation of the neural network;
storing, by the circuits for implementing functions, the intermediate data in a buffer unit;
reading, by the circuits for implementing functions, the intermediate data from the buffer unit; and
performing, by the circuits for implementing functions, the reverse calculation of the neural network on the intermediate data to obtain a result of the reverse calculation,
wherein the neural network is a recurrent neural network (RNN):
following formulas are used in the forward calculation in the RNN:
xt=atw1+ft-1w2;
yt=xtft-1;
zt=xtyt;
ft=ytzt;
following formulas are used in the reverse calculation in the RNN:
wherein w1, w2 represent weights of the RNN, at represents an input, f1 represents an output, xt, yt, zt are the intermediate data, t is at a time t, and L is a cost function.
|