Specify active function for each tensor from DecompLayer
Fix some bugs