code: def add_noise(weights, other_weights):
      '''add noise to the layer.
      '''
      w_range = np.ptp(other_weights.flatten())
      noise_range = NOISE_RATIO * w_range
      noise = np.random.uniform(-noise_range / 2.0, noise_range / 2.0, weights.shape)
      return np.add(noise, weightsf add_noise(weights, other_weights):
      '''add noise to the layer.
      '''
      w_range = np.ptp(other_weights.flatten())
      noise_range = NOISE_RATIO * w_range
      noise = np.random.uniform(-noise_range / 2.0, noise_range / 2.0, weights.shape)
      return np.add(noise, weights)
docs: add noise to the layer.