Cross entropy is computed using matrix operations instead of specific mathcore wrappers