Preheat the oven to 350 F and position a rack in the center of the oven. Lightly spray the bottoms of two 8 or 9 inch round cake pans with nonstick baking spray. Line the bottoms of the pans with circles of parchment paper, and spray the paper, too.
In a saucepan, melt the butter over medium heat. Continue to cook the butter, swirling the pan occasionally, until the surface of the butter begins to foam and nutty, golden brown solids have formed at the bottom of the pan. Remove the pan from the heat, and scrape the butter and browned bits into a large mixing bowl. Let cool for 5 minutes.
To the bowl of browned butter, add the pureed sweet potato, granulated sugar, brown sugar, eggs, milk and vanilla extract, and whisk until smooth.
In a separate bowl, sift together the flour, baking soda, salt and spices. Add the dry ingredients to the wet ingredients, and whisk until just combined. Divide the batter between the prepared pans.
Bake two 8 inch layers for about 30-35 minutes, and two 9 inch layers for about 25-30 minutes. When the cake is done, a cake tester or sharp knife inserted should come out clean, or with moist crumbs clinging to it. Don't under-bake, or the cake can end up too moist and overly dense.
Set the pans on a cooling rack and let cool for 15 minutes. Run a sharp knife around the sides of the cake, turn the cake out onto a cooling rack, cover loosely with a clean kitchen towel, and cool completely before frosting. Peel the parchment paper off the bottoms of the cakes before frosting.