def get_activation_by_name(activation_name, activation_id=None):
import bigdl.nn.layer as BLayer<EOL>activation = None<EOL>activation_name = activation_name.lower()<EOL>if activation_name == "<STR_LIT>":<EOL><INDENT>activation = BLayer.Tanh()<EOL><DEDENT>elif activation_name == "<STR_LIT>":<EOL><INDENT>activation = BLayer.Sigmoid()<EOL><DEDENT>elif activation_name == "<STR_LIT>":<EOL><INDENT>activation = BLayer.HardSigmoid()<EOL><DEDENT>elif activation_name == "<STR_LIT:relu>":<EOL><INDENT>activation = BLayer.ReLU()<EOL><DEDENT>elif activation_name == "<STR_LIT>":<EOL><INDENT>activation = BLayer.SoftMax()<EOL><DEDENT>elif activation_name == "<STR_LIT>":<EOL><INDENT>activation = BLayer.SoftPlus(beta=<NUM_LIT:1.0>)<EOL><DEDENT>elif activation_name == "<STR_LIT>":<EOL><INDENT>activation = BLayer.SoftSign()<EOL><DEDENT>elif activation_name == "<STR_LIT>":<EOL><INDENT>activation = BLayer.Identity()<EOL><DEDENT>else:<EOL><INDENT>raise Exception("<STR_LIT>" % activation_name)<EOL><DEDENT>if not activation_id:<EOL><INDENT>activation.set_name(activation_id)<EOL><DEDENT>return activation<EOL>
Convert to a bigdl activation layer
        given the name of the activation as a string