nm.py receives weigths file as a parameter