I m working on a deep multimodal autoencoder in the case of unsupervised learning which takes two inputs with shape of (1000, 50) and (1000,60) respectively to reconstruct the intial two inputs. The model has 3 hidden layers and aim to concatenate the two latent layer of input1 and input2. Both outputs are then used to compute two losses(MSE).
Please note that X and X1 were generated as the following in order to compute for each element the average value of its neighborhood :
matrix(1000,50) , matrix1(1000,60) and A is the adjacency matrix with the shape of (1000,1000)
summed_groups_matrix = A@matrix
summed_groups_matrix1 = A@matrix1
neighborhood_sizes = A.sum(axis=1)
X=summed_groups_matrix / neighborhood_sizes
X1=summed_groups_matrix1 / neighborhood_sizes
The complete code of the multi-modal autoencoder is the following :
input_X = Input(shape=(X[0].shape))
dense_X = Dense(40,activation='relu')(input_X)
dense1_X = Dense(20,activation='relu')(dense_X)
latent_X= Dense(2,activation='relu')(dense1_X)
input_X1 = Input(shape=(X1[0].shape))
dense_X1 = Dense(40,activation='relu')(input_X1)
dense1_X1 = Dense(20,activation='relu')(dense_X1)
latent_X1= Dense(2,activation='relu')(dense1_X1)
Concat_X_X1 = concatenate([latent_X, latent_X1])
decoding_X = Dense(20,activation='relu')(Concat_X_X1)
decoding1_X = Dense(40,activation='relu')(decoding_X)
output_X = Dense(X[0].shape[0],activation='sigmoid')(decoding1_X)
decoding_X1 = Dense(20,activation='relu')(Concat_X_X1)
decoding1_X1 = Dense(40,activation='relu')(decoding_X1)
output_X1 = Dense(X1[0].shape[0],activation='sigmoid')(decoding1_X1)
multi_modal_autoencoder = Model([input_X, input_X1], [output_X, output_X1], name='multi_modal_autoencoder')
multi_modal_autoencoder.compile(optimizer=keras.optimizers.Adam(lr=0.001),loss='mse')
model = multi_modal_autoencoder.fit([X,X1], [X, X1], epochs=70, batch_size=150)
While using multi_modal_autoencoder.evaluate(X,X1) it returns this error :
TypeError: 'method' object is not subscriptable
What should i pass in the model.evaluate ?