Processed loss parameter and set default value based on the last layer of the network architecture

parent f0801126
Pipeline #105357 passed with stages
in 5 minutes and 10 seconds