Preheat oven to 350°F. Butter and lightly flour four 6-inch round cake pans (or three 8-inch round cake pans). Tap out any excess flour. Line cake pans with parchment paper and set aside.
In a large bowl, whisk together flour, baking soda, baking powder, salt, and cinnamon. Set aside.
In the bowl of stand mixer fitted with a paddle attachment (or using a hand mixer), beat together sugars, eggs, vegetable oil, milk, and vanilla until smooth.
Add half of dry flour mixture to mixing bowl and stir together. Add grated carrots and continue mixing. Add remaining dry flour mixture and chopped walnuts. Mix until just combined and there are no longer any dry streaks of flour.
Distribute cake batter evenly among prepared cake pans. Bake 6-inch cakes for 40-45 minutes (or 8-inch cakes for 35-40 minutes), until a toothpick inserted in center of cake comes out clean. Rotate cakes midway through baking. Allow cake layers in cool in pan for 5-8 minutes. Unmold cake layers and allow to cool completely on wire racks.