If I had to bet my money, I'd say that yes, he might know that. Then again he also surely "knows" that the French are degenerate cowards, that the British have no quarrel with Germany and will see the light, and that the Germans are superior, and lots of other such "knowledge". He also knows what he wants, and he has a way of convincing himself that what he wants will come to pass successfully. Destiny is with him.
So he invades.
All that is true, but Hitler is still a very shrewd man. I'm going off other people ITT who are saying that Hitler and the top brass thought the French and British would stand by as they did in the Rhineland, Austria, Munich and the annexation of Bohemia. If there are Allied troops in Poland, there is no way for him to deny it.