Was Adolf Hitler religious?

The leader of the Third Reich spoken often, both publicly and privately, about religion. He often seems to have contradicted himself. What were his actual beliefs?