This invention relates to compounds of the formulawherein and R1 to R3 are as described herein, or to pharmaceutically acceptable salts thereof. These compounds are BACE1 and/or BACE2 inhibitors and can be used as pharmaceuticals for the therapeutic and/or prophylactic treatment of diseases such as Alzheimer's disease, diabetes, particularly type 2 diabetes, and other metabolic disorders.