Skip to content

Commit 45f6e1a

Browse files
author
Haonan
committed
change hlactivetype instead of act.name
1 parent 880774d commit 45f6e1a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

paddle/utils/Util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ hl_activation_mode_t hlActiveType(const std::string& type) {
378378
return HL_ACTIVATION_RELU;
379379
} else if (type == "tanh") {
380380
return HL_ACTIVATION_TANH;
381-
} else if (type == "linear") {
381+
} else if (type == "linear" || type == "") {
382382
return HL_ACTIVATION_LINEAR;
383383
} else {
384384
LOG(FATAL) << "Do not support activation type " << type;

python/paddle/trainer_config_helpers/activations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class IdentityActivation(BaseActivation):
104104
Just do nothing for output both forward/backward.
105105
"""
106106

107-
def __init__(self): BaseActivation.__init__(self, 'linear', False)
107+
def __init__(self): BaseActivation.__init__(self, '', False)
108108

109109

110110
LinearActivation = IdentityActivation

0 commit comments

Comments
 (0)