fixing hidden gradient calculation, had commented output_error_gradient param