Update layer_factory.cpp
Merge pull request #1161 from jjkjkj/dev-threshold-fix

Fix Threshold layer