Computer-implemented method for creating a deep neural network, wherein the deep neural network has a plurality of layers and connections with weights, and the weights in the created deep neural network can assume only predefinable discrete values from a predefinable list of discrete values, comprising the following steps: - providing at least one training input variable for the deep neural network; - determining a variable characterizing a cost function, wherein the variable characterizing the cost function comprises a first variable, which characterizes a deviation of an output variable of the deep neural network, the output variable being determined depending on the provided training input variable, relative to a predefinable target output variable, and wherein the variable characterizing the cost function furthermore comprises at least one penalty variable, wherein the penalty variable characterizes a deviation of an a-posteriori distribution function of one of the weights from an a-priori distribution function of the predefinable discrete values of this weight; - training the deep neural network in such a way that the deep neural network detects an object depending on the training input variable of the deep neural network, wherein during the training of the deep neural network at least one value of one of the weights is adapted depending on the variable characterizing the cost function; and - mapping the values of the weights onto in each case a discrete value contained in the predefinable list, wherein the weights are stored on the basis of an index of the discrete value from the list, wherein in each case only an index of the value of the weight and the predefinable list with discrete values and the indices thereof are stored. wherein the deep neural network has a plurality of layers and connections with weights, and the weights in the created deep neural network can assume only predefinable discrete values from a predefinable list of discrete values, comprising the following steps: - providing at least one training input variable for the deep neural network; - determining a variable characterizing a cost function, wherein the variable characterizing the cost function comprises a first variable, which characterizes a deviation of an output variable of the deep neural network, the output variable being determined depending on the provided training input variable, relative to a predefinable target output variable, and - providing at least one training input variable for the deep neural network; - determining a variable characterizing a cost function, wherein the variable characterizing the cost function comprises a first variable, which characterizes a deviation of an output variable of the deep neural network, the output variable being determined depending on the provided training input variable, relative to a predefinable target output variable, and wherein the variable characterizing the cost function furthermore comprises at least one penalty variable, wherein the penalty variable characterizes a deviation of an a-posteriori distribution function of one of the weights from an a-priori distribution function of the predefinable discrete values of this weight; - training the deep neural network in such a way that the deep neural network detects an object depending on the training input variable of the deep neural network, - training the deep neural network in such a way that the deep neural network detects an object depending on the training input variable of the deep neural network, wherein during the training of the deep neural network at least one value of one of the weights is adapted depending on the variable characterizing the cost function; and - mapping the values of the weights onto in each case a discrete value contained in the predefinable list, wherein the weights are stored on the basis of an index of the discrete value from the list, wherein in each case only an index of the value of the weight and the predefinable list with discrete values and the indices thereof are stored. - mapping the values of the weights onto in each case a discrete value contained in the predefinable list, wherein the weights are stored on the basis of an index of the discrete value from the list, wherein in each case only an index of the value of the weight and the predefinable list with discrete values and the indices thereof are stored.