Heat the oven to 350F and grease and line two 8-inch round tins.
Whisk the flour, sugar, baking soda, baking powder, cinnamon and salt together.
Beat in the oil and eggs until smooth, then stir in the grated carrots and walnuts.
Divide between the tins and bake for about 35 to 40 minutes, until a skewer in the centre comes out with a few moist crumbs, then cool completely.
For the frosting, beat the softened cream cheese and butter smooth, then beat in the powdered sugar and vanilla until light.
Frost only once the cakes are fully cool, filling between the layers and covering the top and sides, and keep the finished cake cool.