mmxmb / keras_ensemblng Goto Github PK
View Code? Open in Web Editor NEWEnsembling ConvNets using Keras
License: MIT License
Ensembling ConvNets using Keras
License: MIT License
It would be great if you can help letting know how to add a pretrained model in to this ensemble. I tried to add VGG16 through a model definition. However, vgg16 takes the input like this:
applications.vgg16(weights='imagenet', include_top=False, input_shape=(img_rows, img_cols, 3))
i'm not able to use model_input as you used in the definition file of all the custom models. it would be great if you can help how to add a pretrained model into this ensemble. You help is very much appreciated.
If you have the code, please pm me at [email protected]
Thanks once again.
@LawnboyMax
hi, i met this situation.
RuntimeError: Graph disconnected: cannot obtain value for tensor Tensor("input_1_3:0", shape=(?, 224, 224, 3), dtype=float32) at layer "input_1". The following previous layers were accessed without issue: []
i check the code,and it seem that the Model
in the ensemble
function
how to change it ?
here is my code:
model_input= Input(shape=(224,224,3))
model_vgg = model_from_json(open('model_472.json').read())
model_vgg.load_weights('weights_472.h5')
model_inc = model_from_json(open('model_473.json').read()) model_inc.load_weights('weights_473.h5')
model_dense = model_from_json(open('model_47.json').read())
model_dense.load_weights('weights_47.h5')
models = [model_vgg,model_inc,model_dense]
when i call the ensemble
function:
def ensemble(models,model_input):
outputs = [model.outputs[0] for model in models]
y = Average()(outputs)
model = Model(model_input,y,name='ensemble')
return mode
ensemble_model = ensemble(models,model_input)
i also check similar issue.
i change that Model(inputs=[model_input,model_input,model_input],y,name='ensemble'
,it doesn't work.
Do you give some suggestions.
thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.