got deep net gradient working