added nn_device and nn_term
added .gitignore