This invention relates to dihydropyrimidinones of the formula
wherein X and R
1
to R
7
are as defined in the description, as well as pharmaceutically acceptable salts thereof. These compounds are BACE2 inhibitors and can be used as medicaments for the treatment or prevention of diseases such as diabetes.