XNOR Neural Engine: a Hardware Accelerator IP for 21.6 fJ/op BNN Inference CODES'18, October 2018, Torino, Italy for k_out in range(0, N_out): for k_in in range(0, N_in): for i in range(0, h_out): for j in range(0, w_out): y[k_out,i,j] = 0 for u_i in range(0, fs): for u_j in range(0, fs): y[k_out,i,j] += W[k_out,k_in,u_i,u_j] * x[k_in,i+u_i,j+u_j]