 
     void WeightNormSpikingPlasticity::weight_normalization(){
 	if (total_number_of_plastic_synapses > 0) {
+	CudaSafeCall(cudaMemcpy((void*)afferent_weight_change_updater,
+			(void*)frontend()->afferent_weight_change_updater,
+			sizeof(float)*frontend()->neurs->total_number_of_neurons, cudaMemcpyHostToDevice));
+
 	// First calculate the weight change
 	weight_change_calculations<<<synapses_backend->number_of_synapse_blocks_per_grid, synapses_backend->threads_per_block>>>(
 		synapses_backend->postsynaptic_neuron_indices,

			int postneuron = postsyn_neuron[idx];
			if (neuron_in_plasticity_set[postneuron]){
				float division_value = weight_divisor[postneuron];
				current_weight[idx] = current_weight[idx] / division_value;
			}
			indx += blockDim.x * gridDim.x;
		}

		while (idx < total_number_of_neurons) {
			if (neuron_in_plasticity_set[idx])
			{
				if ((sum_squared_afferent_values[idx] - afferent_weight_change_updater[idx] < 0.01))
					printf("NORMALIZATION DIFF VERY LARGE. DANGER OF SYNAPSES ALL -> ZERO");
				weight_divisor[idx] = sqrtf(sum_squared_afferent_values[idx] + afferent_weight_change_updater[idx]) / sqrtf(sum_squared_afferent_values[idx]);
			}
			idx += blockDim.x * gridDim.x;		
		}
		__syncthreads();
	}


