In case of loss function, if you try to return more values than the loss function is returning then this error erupts.