ooooh totally was. He was deeply affected by Hume's attack on causation, so tried to come up with a coherent response. Ended up positing a whole bunch of wacky and (I think) true things about our embedded cognition, so I think it's probably fair to say that Critique of Pure Reason is the result of his beef with Hume.