First coding without errors of cross-entropy. Not checked yet.