Preheat oven to 350°F (175°C) and grease two 9-inch round cake pans.
In a large bowl, whisk together flour, sugar, baking powder, baking soda, salt, and cinnamon.
Add vegetable oil and eggs to the dry mixture and whisk until well combined.
Fold in the grated carrots and chopped walnuts using a spatula.
Divide the batter evenly between the two prepared cake pans.
Bake for 40 to 45 minutes or until a toothpick inserted into the center comes out clean.
Allow cakes to cool in pans for 10 minutes before transferring to wire racks to cool completely.
In a medium bowl, beat softened cream cheese and butter until smooth.
Gradually add powdered sugar and vanilla extract, beating until frosting is fluffy.
Frost the top of one cake layer, stack the second layer on top, and frost the remaining top and sides.