Commit ·
b78bb63
1
Parent(s): 26321f9
Fix mobilenet error
Browse files- src/nets/mobilenet.py +2 -2
src/nets/mobilenet.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from keras import backend as K
|
| 2 |
from keras.layers import (Activation, BatchNormalization, Conv2D,
|
| 3 |
DepthwiseConv2D, Dropout, GlobalAveragePooling2D,
|
| 4 |
-
Input, Reshape)
|
| 5 |
from keras.models import Model
|
| 6 |
|
| 7 |
|
|
@@ -98,7 +98,7 @@ def MobileNet(input_shape=None,
|
|
| 98 |
return model
|
| 99 |
|
| 100 |
def relu6(x):
|
| 101 |
-
return
|
| 102 |
|
| 103 |
if __name__ == '__main__':
|
| 104 |
model = MobileNet(input_shape=(224, 224, 3))
|
|
|
|
| 1 |
from keras import backend as K
|
| 2 |
from keras.layers import (Activation, BatchNormalization, Conv2D,
|
| 3 |
DepthwiseConv2D, Dropout, GlobalAveragePooling2D,
|
| 4 |
+
Input, Reshape, ReLU)
|
| 5 |
from keras.models import Model
|
| 6 |
|
| 7 |
|
|
|
|
| 98 |
return model
|
| 99 |
|
| 100 |
def relu6(x):
|
| 101 |
+
return ReLU(x, max_value=6)
|
| 102 |
|
| 103 |
if __name__ == '__main__':
|
| 104 |
model = MobileNet(input_shape=(224, 224, 3))
|