cross-entropy loss wrapper (draft)