Minor fixes

1. train_net, restore threshold in test (accuracy_layer)
2. adaptive margin, set upper bound from 39.9 to 399.9