TF2
TF2 copied to clipboard
Question of pruning code
final_c16 = round(float(nz_c)/16)*16 if round(float(nz_c)/16)*16>0 else 16 if final_c16 > nz_c: #change 0 to 1 ichange_c = final_c16 - nz_c for c_index in range(c_num): if sumMask_C[c_index]==0 and ichange_c>0: param_mask[:,c_index,:,:]=1 ichange_c=ichange_c-1 if final_c16 < nz_c: #change 1 to 0 ichange_c = nz_c - final_c16 for c_index in range(c_num): if sumMask_C[c_index]== 1 and ichange_c>0: param_mask[:,c_index,:,:]=0 ichange_c=ichange_c-1
The pruning is not in the papers and documents. What is the use?
Why is this calculated here?
@suhong1 This code is to ensure that the number of channels is a multiple of 16,and this is for high speed calculation of fpga.