A computer-implemented method of converting a plurality of weights of a Deep Neural Network (DNN) from a set of first number formats to a set of second number formats to enable the DNN to be implemented in hardware logic, the plurality of weights of the DNN being divisible into a plurality of filters, each filter being an input to a layer of the DNN and associated with a first number format of the set of first number formats and a second number format of the set of second number formats, the second number format associated with a filter having less precision than the first number format associated with the filter, the method comprising, for each filter of the plurality of filters:
- (a) determining whether an expected mean of input data values to the layer of the DNN associated with the filter is non-zero;
- (b) in response to determining that the expected mean of the input data values is zero, quantising the weights of the filter from the first number format associated with the filter to the second number format associated with the filter in accordance with a first quantisation method;
- and
- (c) in response to determining that the expected mean of the input data values is non-zero, quantising the weights of the filter from the first number format associated with the filter to the second number format associated with the filter in accordance with a second, different, quantisation method.