imitation-learning icon indicating copy to clipboard operation
imitation-learning copied to clipboard

loss function for training

Open Florence-C opened this issue 6 years ago • 2 comments

Hello,

I have a question about the loss used to train the model. In your paper, the action is apparently two dimensional (steer and acceleration), whereas it seems to be 3-dimensional in the code (steer, acceleration and brake). Which one is the correct one ? And what is the loss for the action ? the squared error between groundtruth and computed action ? Or is there a weigh to give more importance to some aspect of the action (steer for instance) (the lambda in the 6th equation in the paper) ?

Moreover, is the loss for the actions summed with the loss of the speed branch during training ? And if yes, what is the weight of each loss (as the loss for the speed will be much bigger than the loss for the actions).

Thank you in advance

Florence-C avatar Apr 18 '18 12:04 Florence-C

Hello @Florence-C

For the CARLA paper, the loss function was 0.45 for steer, 0.05 for brake and 0.45 for gas. This is for each command branch. Then there is the separate steering branch that is weighted 0.05 and 0.95 to the others. Basically the equation would be:

loss = 0.95(0.45gas+0.45steer+0.05brake) + 0.05 branch

For the ICRA paper we were using the following parameters: loss = 0.95(0.45gas+0.45steer+0.05brake) + 0.05 branch

We kind of needed to change the weights since ICRA used human driving data and the CARLA paper mostly agent data.

As for you saying that the ICRA paper action was two dimensional. That was the case only for the robotic CAR since it only had a servo actuator and an engine. So the action space was the signal (PWM) send to these actuators.

Thanks a lot for your interest !

felipecode avatar Apr 23 '18 15:04 felipecode

Hello @felipecode

Thank you for you response !

I'm not sure I understand, there is a separate steering branch ? Or did you mean speed branch ? If it is indeed a speed branch, why trying to compute the speed from a single image input ? How does that make sense ? Moreover, the weight for gas, steer and brake do not sum up to 1, is that normal ? How did you choose the weights ? By trying different ones, or is there a physical reason behind ? And why is the brake weight so much smaller than the gas weight ?

And thanks for the explanation about the data !

Best

Florence-C avatar Apr 23 '18 16:04 Florence-C