Melt the butter in a small saucepan set over low heat, continue to simmer gently until butter is clear (8-10 minutes). Skim off any foam, then pour the clear liquid into a bowl, leaving behind the solids. Add the garlic and rosemary to the clarified butter.
Preheat oven to 200°C. You can make this with skin or off. If doing with skin on, scrub the sweet potatoes, pat dry and finely slice on a mandolin about 2mm thick.
Brush a layer of butter mixture onto a baking dish or oven-proof pan, about 24cm in diameter.
Arrange an even layer of sweet potato slices, slightly overlapping in circles, in the dish. Brush with butter mixture and season with salt and pepper. Repeat this with remaining slices, brushing each layer with clarified butter and salt and pepper, and keeping the layers as even as possible. Pack the potatoes tightly and finish with a drizzle of butter on top, down the sides and around the edges, then add 2 tbsp water. Discard any leftover butter.
Place in the oven and bake until crisp and tender, about 1 hour, 15 minutes.
Remove from the oven and let cool for a few minutes. Serve with grated parmesan.