image_input = Input(shape=(32, 32, 3))
other_data_input = Input(shape=(10,))
conv1 = Convolution2D(nb_filter=nb_filter1, nb_row=nb_row1, nb_col=_nb_col1,
    border_mode='same', activation='tanh')(image_input)
conv1 = MaxPooling2D(pool_size=(pool_1, pool_2))(conv1)
conv2 = Convolution2D(nb_filter=nb_filter2, nb_row=nb_row2, nb_col=_nb_col2,
    border_mode='same', activation='tanh')(conv1)
conv2 = MaxPooling2D(pool_size=(pool_1, pool_2))(conv2)
first_part_output = Flatten()(conv2)
merged_model = merge(mode='concat')([first_part_output, other_data_input])
predictions = Dense(1, activation='softmax')(merged_model)
model = Model(input=[image_input, other_data_input], output=predictions)
model.summary()
model.compile(optimizer='adamax', loss='binary_crossentropy')
Добавление переменной в плотный слой Keras/TensorFlow CNN