I want to add some error percentage (relative error) to the output of max-pooling layer in CNN. I am using max pooling layer from keras. Below is the code
i = Input(shape=x_train[0].shape)
x = Conv2D(32, (3, 3), activation='relu', padding='same')(i)
x = BatchNormalization()(x)
x = Conv2D(32, (3, 3), activation='relu', padding='same')(x)
x = BatchNormalization()(x)
x = MaxPooling2D((2, 2))(x)
How can I add some errors to the output of this layer? I want to add some fraction of the original output. e.g. if x is my original output, I want my output to be x+ some fraction of (x).
Thanks in advance.