change hlactivetype instead of act.name

avx_docs
Haonan 9 years ago
parent 880774d141
commit 45f6e1abee

@ -378,7 +378,7 @@ hl_activation_mode_t hlActiveType(const std::string& type) {
return HL_ACTIVATION_RELU;
} else if (type == "tanh") {
return HL_ACTIVATION_TANH;
} else if (type == "linear") {
} else if (type == "linear" || type == "") {
return HL_ACTIVATION_LINEAR;
} else {
LOG(FATAL) << "Do not support activation type " << type;

@ -104,7 +104,7 @@ class IdentityActivation(BaseActivation):
Just do nothing for output both forward/backward.
"""
def __init__(self): BaseActivation.__init__(self, 'linear', False)
def __init__(self): BaseActivation.__init__(self, '', False)
LinearActivation = IdentityActivation

Loading…
Cancel
Save