First, preheat the oven to 400 degrees F.
Peel and slice the sweet into very thin rounds. You can use a mandoline slicer to do this.
In a saucepan, over medium heat, sauté butter and garlic until fragrant. Add the flour and whisk in until combined.
Next, add the Parmesan cheese, milk, cream, salt, pepper, cinnamon, ground ginger, nutmeg, chopped fresh rosemary, stir and bring the mixture to a soft boil. Remove from heat and allow to cool a bit.
Once cooled, stir in the shredded mozzarella and cheddar cheese.
Arrange the thinly sliced sweet potatoes in a row or in circles In a casserole dish, and pour the cheese mixture on top evenly.
Then, cover with foil and bake for 30-35 minutes.
Remove foil and bake for an additional 8 to 10 minutes.
Garnish with fresh rosemary and serve warm.