How to use mobilenet layer/module in the new version of Keras

492 views
Skip to first unread message

Tin Duong

unread,
Jul 12, 2018, 10:59:31 AM7/12/18
to Keras-users
As I am using the code which use the old version of Keras as following:

from keras.applications.mobilenet import DepthwiseConv2D
from keras.applications.mobilenet import relu6
from keras.applications.mobilenet import _conv_block

Then I have the problem that : 
ImportError: cannot import name '_conv_block'

I have change the first two layers as the suggestion in: https://github.com/fizyr/keras-retinanet/pull/504/commits/c21a41a39d8ac59cd5b8b395a45cf82a09638392 and it worked but I cannot find the solution for the last layer


from keras.applications.mobilenet import mobilenet
from keras.utils import get_file

Moreover, when I checked the new source code of keras, they said that the layer "relu6" has been replaced with ReLU layers, so anyone can give me an instruction to call these old layers in the new version of Keras?

Reply all
Reply to author
Forward
0 new messages