yoheikikuta / senet-keras Goto Github PK
View Code? Open in Web Editor NEWNaive implementation of SENet in Keras
License: MIT License
Naive implementation of SENet in Keras
License: MIT License
Can it support Tensorflow 2.0 with Windows10?
Excuse me, my computer can only run when batch_size=1, what is your batch_size set to?
ValueError: Only tensors of same shape can be merged by layermultiply_1 Got input shapes: [(None, 96, 96, 64), (None, 1, 1, 64)]
在吗 ?代码运行出错 ValueError: An operation has None
for gradient. Please make sure that all of your ops have a gradient defined (i.e. are differentiable). Common ops without gradient: K.argmax, K.round, K.eval.
I train senet model like this:
senet =SEResNeXt.SEResNeXt(224,12).model
adam = tensorflow.keras.optimizers.Adam(lr=0.001, beta_1=0.9, beta_2=0.999, decay=1e-6)
senet.compile(loss='categorical_crossentropy',optimizer=adam, metrics=['accuracy'])
filepath="model_val/weights-improvement-{epoch:02d}-{acc:.2f}.hdf5"
checkpoint = ModelCheckpoint(filepath, monitor='acc', verbose=1, save_best_only=True, mode='max')
senet.fit(X, Y ,epochs=200, batch_size=2,callbacks=[checkpoint ])
When I try to load trained model, i got this :
model = load_model('model_val/weights-improvement-32-0.95.hdf5') File "/home/tensorflow04/anaconda3/lib/python3.6/site-packages/keras/models.py", line 240, in load_model model = model_from_config(model_config, custom_objects=custom_objects) File "/home/tensorflow04/anaconda3/lib/python3.6/site-packages/keras/models.py", line 314, in model_from_config return layer_module.deserialize(config, custom_objects=custom_objects) File "/home/tensorflow04/anaconda3/lib/python3.6/site-packages/keras/layers/__init__.py", line 55, in deserialize printable_module_name='layer') File "/home/tensorflow04/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 139, in deserialize_keras_object list(custom_objects.items()))) File "/home/tensorflow04/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2490, in from_config process_layer(layer_data) File "/home/tensorflow04/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2476, in process_layer custom_objects=custom_objects) File "/home/tensorflow04/anaconda3/lib/python3.6/site-packages/keras/layers/__init__.py", line 55, in deserialize printable_module_name='layer') File "/home/tensorflow04/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 139, in deserialize_keras_object list(custom_objects.items()))) File "/home/tensorflow04/anaconda3/lib/python3.6/site-packages/keras/layers/core.py", line 696, in from_config printable_module_name='function in Lambda layer') File "/home/tensorflow04/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 156, in deserialize_keras_object fn = module_objects.get(function_name) AttributeError: 'NoneType' object has no attribute 'get'
hello, have you SE-resnet50 in keras ?
imagenet or coco,thank you very much
I create my model like this:
model = SEResNeXt(size=256, num_classes=4).model
When I try to run the model on several GPUs by
parallel_model = multi_gpu_model(model, gpus=nb_gpu)
I got this error:
Concatenate layer requires inputs with matching shapes except for the concat axis. Got inputs shapes: [(None, None, None, 32), (None, 128, 128, 64), (None, None, None, 32)]
python = 3.4.3
keras = 2.0.9
Hello, Mr. Kikuta,
Thank you for sharing your code of SENet based on Keras.
I'm curious if this SENet can be converted to encoder-decoder architecture with skip connections?
Just like U-Net which can do the segmentation work?
Thank you.
This project is very useful to me, thank you very much. But can you tell me what is the role of the "channel" in line 136 of the SEResNeXt.py file? The object "channel" appears only once in the entire file.
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.