Got hinge loss working

- unfortunately, no significant improvement
Added encoder learning - doesn't work