A computer-implemented method of configuring a hardware implementation of a Convolutional Neural Network, the method comprising: receiving a CNN with multiple layers, wherein weight values in each layer of the CNN have been generated by training the CNN using a training data set and wherein the generated weight values are in a floating-point format; determining, for each of a plurality of layers of the CNN, a first number format for representing weight values in the layer based upon a distribution of weight values for the layer, wherein values are represented in the first number format by a first integer of a first predetermined bit-length and a first exponent value that is fixed for the layer; determining, for each of a plurality of layers of the CNN, a second number format for representing input data values in the layer based upon a distribution of expected input data values for the layer, wherein values are represented in the second number format by a second integer of a second predetermined bit-length and a second exponent value that is fixed for the layer; storing the determined number formats for use in configuring the hardware implementation of a CNN; tuning the weight values, the tuning comprising: selecting, for each of a plurality of layers, only a subset of the weight values in that layer; quantising, for each of a plurality of layers, only the selected weight values in that layer in accordance with the first number format for that layer to generate modified weight values in that layer; and training the CNN using the modified weight values and the not selected weight values in floating-point format to generate tuned weight values; quantising the tuned weight values for each of the plurality of layers of the CNN into the first number format for that layer to generate quantised weight values for the layer; and storing the quantised weight values for each of the plurality of layers of the CNN in a memory accessible by the hardware implementation of the CNN or in one or more buffers in the hardware implementation of the CNN. receiving a CNN with multiple layers, wherein weight values in each layer of the CNN have been generated by training the CNN using a training data set and wherein the generated weight values are in a floating-point format; determining, for each of a plurality of layers of the CNN, a first number format for representing weight values in the layer based upon a distribution of weight values for the layer, wherein values are represented in the first number format by a first integer of a first predetermined bit-length and a first exponent value that is fixed for the layer; determining, for each of a plurality of layers of the CNN, a second number format for representing input data values in the layer based upon a distribution of expected input data values for the layer, wherein values are represented in the second number format by a second integer of a second predetermined bit-length and a second exponent value that is fixed for the layer; storing the determined number formats for use in configuring the hardware implementation of a CNN; tuning the weight values, the tuning comprising: selecting, for each of a plurality of layers, only a subset of the weight values in that layer; quantising, for each of a plurality of layers, only the selected weight values in that layer in accordance with the first number format for that layer to generate modified weight values in that layer; and training the CNN using the modified weight values and the not selected weight values in floating-point format to generate tuned weight values; selecting, for each of a plurality of layers, only a subset of the weight values in that layer; quantising, for each of a plurality of layers, only the selected weight values in that layer in accordance with the first number format for that layer to generate modified weight values in that layer; and training the CNN using the modified weight values and the not selected weight values in floating-point format to generate tuned weight values; quantising the tuned weight values for each of the plurality of layers of the CNN into the first number format for that layer to generate quantised weight values for the layer; and storing the quantised weight values for each of the plurality of layers of the CNN in a memory accessible by the hardware implementation of the CNN or in one or more buffers in the hardware implementation of the CNN.