Open kimiqq opened 7 years ago
merged = Merge([model_left, model_right,model3], mode='concat') #merge modelm = Sequential() modelm.add(merged) # add merge modelm.add(Dense(128, activation='tanh')) modelm.add(Dense(num_label, activation='softmax'))
get_feature=theano.function([modelm.layers[0].input],modelm.layers[1].output(train=True),allow_input_downcast=False) feature = get_feature(x)
@kimiqq 可否贴全部代码呢?另外使用Keras的K.function来编译会有什么结果呢?
merged = Merge([model_left, model_right,model3], mode='concat') #merge modelm = Sequential() modelm.add(merged) # add merge modelm.add(Dense(128, activation='tanh')) modelm.add(Dense(num_label, activation='softmax'))
get_feature=theano.function([modelm.layers[0].input],modelm.layers[1].output(train=True),allow_input_downcast=False) feature = get_feature(x)