initial commit (#10387)

simplify_fluid_api_recognize_digit
Kexin Zhao 7 years ago committed by GitHub
parent 7a86069422
commit 8cc91bc025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -400,11 +400,11 @@ class LayerHelper(object):
if isinstance(act, basestring):
act = {'type': act}
if 'use_cudnn' in self.kwargs and self.kwargs.get('use_cudnn'):
act['use_cudnn'] = self.kwargs.get('use_cudnn')
if 'use_mkldnn' in self.kwargs:
act['use_mkldnn'] = self.kwargs.get('use_mkldnn')
act_type = act.pop('type')
if 'use_mkldnn' in self.kwargs:
act['use_mkldnn'] = self.kwargs.get('use_mkldnn')
tmp = input_var
# NOTE(dzhwinter): some activation support inplace compution.
if not core.IsInplace(act_type):

@ -88,6 +88,7 @@ def fc(input,
num_flatten_dims=1,
param_attr=None,
bias_attr=None,
use_cudnn=False,
use_mkldnn=False,
act=None,
is_test=False,

Loading…
Cancel
Save