Preheat the oven to 375°F. Butter a 9x9" pan and set aside.
Combine the garlic, cream and fresh rosemary in a small saucepan over medium heat. Salt and pepper to taste. I added about 1/2 teaspoon salt and 1/4 teaspoon pepper. Simmer for a couple minutes. Add in 1/4 cup of the gruyere and 1/4 cup of the cheddar and stir until melted.
Slice the sweet potatoes into thin circles and place in the pan in a row, overlapping a little. Sprinkle about 1/2 of the cheese over top. Then add another layer of potatoes and cheese.
Pour the cream over top and then bake for 35-40 minutes, or until the potatoes are tender. Top with bacon if desired.
If you like onions, you can add 1/2 cup chopped onion in with the garlic and cream.
If you want to take these sweet potatoes up a notch, add bacon to the top. All you need to do is cook 4 slices of bacon in a pan over medium heat and then crumble it once cooked and cooled. Then once the scalloped sweet potatoes are cooked you can sprinkle the bacon on top.