Peel the sweet potatoes and Yukon Gold potatoes and use a food processor or mandoline to slice them into 1/8" thick rounds. If using a knife, see recipe note below.
Combine the cream, milk, 1 tablespoon butter, and garlic in small saucepan and place over low heat. Watch the pot to be sure it doesn't boil over while you proceed with the rest of the recipe.
Butter a 10" round or square baking dish with the remaining 1/2 tablespoon of butter. Transfer half of potatoes to the prepared baking dish, arranging them so that you are alternating the sweet potato slices with some Yukon Gold potato slices. Sprinkle with half of the salt, pepper to taste, and half of the fresh thyme. Sprinkle with half of the Gruyère and Parmesan cheese. Repeat layering with remaining potatoes, salt, pepper, thyme, and cheese. Use your hands to compact the mixture down into the baking dish and then pour the cream mixture over the top.
Select the BAKE function. Turn the temperature to 400 degrees F. and preheat the oven. Cut off a sheet of foil large enough to cover your dish and coat the bottom side with non-stick cooking spray. This will ensure the cheese will not stick to the foil when you remove it. Cover the gratin tightly with the foil and transfer the dish to the oven. Bake for 35 minutes.
Use oven mitts to remove the dish from the oven and remove the foil. Select the BAKE function and turn the temperature to 400 degrees F. Return the dish to the oven and bake, uncovered, for an additional 15 minutes or until the top of the gratin is golden, the potatoes are fork tender, and most of liquid is absorbed. Let it rest for 5 to 10 minutes before serving.