未验证 提交 77ec9f93 编写于 作者: L littletomatodonkey 提交者: GitHub

Merge pull request #186 from wqz960/PaddleClas_0630

fix ghostnet bug
...@@ -19,7 +19,6 @@ topk: 5 ...@@ -19,7 +19,6 @@ topk: 5
image_shape: [3, 224, 224] image_shape: [3, 224, 224]
use_ema: True use_ema: True
ema_decay: 0.9999 ema_decay: 0.9999
use_aa: True
ls_epsilon: 0.1 ls_epsilon: 0.1
LEARNING_RATE: LEARNING_RATE:
...@@ -46,7 +45,7 @@ TRAIN: ...@@ -46,7 +45,7 @@ TRAIN:
transforms: transforms:
- DecodeImage: - DecodeImage:
to_rgb: True to_rgb: True
to_np: Fals to_np: False
channel_first: False channel_first: False
- RandCropImage: - RandCropImage:
size: 224 size: 224
...@@ -85,5 +84,3 @@ VALID: ...@@ -85,5 +84,3 @@ VALID:
std: [0.229, 0.224, 0.225] std: [0.229, 0.224, 0.225]
order: '' order: ''
- ToCHWImage: - ToCHWImage:
#copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
from __future__ import absolute_import from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
...@@ -152,7 +166,7 @@ class GhostNet(): ...@@ -152,7 +166,7 @@ class GhostNet():
initializer=fluid.initializer.Uniform(-stdv, stdv), initializer=fluid.initializer.Uniform(-stdv, stdv),
name=name + '_2_weights'), name=name + '_2_weights'),
bias_attr=ParamAttr(name=name + '_2_offset')) bias_attr=ParamAttr(name=name + '_2_offset'))
#excitation = fluid.layers.clip(x=excitation, min=0, max=1) excitation = fluid.layers.clip(x=excitation, min=0, max=1)
se_scale = fluid.layers.elementwise_mul(x=input, y=excitation, axis=0) se_scale = fluid.layers.elementwise_mul(x=input, y=excitation, axis=0)
return se_scale return se_scale
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册