I plan to do a random projection on the outputs of the encoded and hence
input_img = Input(shape=(32, 32, 3))
x = Conv2D(64, (3, 3), padding='same')(input_img)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = MaxPooling2D((2, 2), padding='same')(x)
x = Conv2D(32, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = MaxPooling2D((2, 2), padding='same')(x)
x = Conv2D(16, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
encoded = MaxPooling2D((2, 2), padding='same')(x)
Added these 3 layers of zeromat, noisemat and dot_product before decoder
zeromat = tf.keras.backend.zeros(shape=tf.keras.backend.shape(encoded))
noisemat = ErrorProp(1)(zeromat)
dot_product = Multiply()([encoded, noisemat])
x = Conv2D(16, (3, 3), padding='same')(dot_product)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = UpSampling2D((2, 2))(x)
x = Conv2D(32, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = UpSampling2D((2, 2))(x)
x = Conv2D(64, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = UpSampling2D((2, 2))(x)
x = Conv2D(3, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
decoded = Activation('sigmoid')(x)
When I run model = Model(input_img, decoded) I get this error I am unable to fix! AttributeError: 'NoneType' object has no attribute '_inbound_nodes'. How can this be fixed or done properly?