Pre heat oven to 350 degrees.
Butter a 9 x 13 inch baking dish. Rub garlic over the butter as well to season the dish. Grate both cheeses and combine- set aside.
In a large pot, add sliced potatoes. Add in smashed garlic, heavy cream or milk, salt, pepper and thyme sprigs. Bring to a simmer over medium high heat. Liquid should just cover potatoes. Add more cream or milk if needed. Stir gently with a scraper to keep sauce from sticking to the bottom. Once potatoes are al dente remove from heat- this takes about 5-7 minutes. Remove thyme stems.
Spoon one third of the potatoes into the prepared buttered baking dish. Spoon over one third of the sauce. Top with one third of the cheese mixture. Repeat layering potatoes, sauce and cheese. Top with additional cheese. Scrape every bit of the sauce out of the pan to cover the potatoes.
Bake at 350 degrees for 35-45 minutes or until potatoes are golden brown and crusty.
Let rest 15 minutes prior to serving.