added disconnected_inputs='warn' to grad computation for all
further investigation required