On the dimension of the compact invariant sets of certain non-linear maps