Not contented with neither rationalism nor empiricism explanations on philosophy, Immanuel Kant resolved the two by proving each of these explanations wrong in its own ways. From Hume's empiricist point of view, Kant does agree that knowledge comes from experience but disagrees with the explanation that the mind is passive and does not contribute to experience. To him, causality is important on how we experience whatever is happening.
For Descartes', he challenged the rationalist view as it gave rise to two problems; that of certainty and that of source of knowledge. Kant disagrees with Descartes point that conscious is only indisputable, observable and inexplicable fact and thus says that therefore the starting point of all philosophy should be "I am conscious" and not "I think" as one can think and become aware of his/her own thoughts thus self confirming them. Kant agrees with Descartes that the mind has categories which do contribute to experience. He argues that the consciousness of a person is bound up in a "unity of consciousness" but this does not mean that the unity of one's experience can be given the fact of experience. Kant claimed that the mind can unify all thoughts and perceptions and put them together to follow a certain rules or categories which we were born with-innate. Although Descartes claimed that one can be conscious of their unity thoughts, he/she may not know their accuracy.
Kant further disputes the above arguments by saying that we ought to trust our senses by putting the perceptions and thoughts together to be able to make objective judgments. He thus disputes Descartes argument that life is a dream and says that we should trust our senses and trust on reason as our knowledge. He thus argues that rationalists should also trust their senses as also empiricists should not only concentrate on senses but also reason is needed. Hence Kant agrees that knowledge does come from experience but also that the mind contributes to this, thus balancing of the two views, rationalism and empiricism.