Why are you casting to ```str```? I would directly pass ```self._loss_type```. 

Nitpick: You don't even need to split the command in two lines are it fits on one line within the 80 chars barrier.