Improved optimization for the neural-network quantum states and tests on the chromium dimer | Synapse