  We investigate the existence of ground states for the focusing nonlinear
Schroedinger equation on a prototypical doubly periodic metric graph. When the
nonlinearity power is below 4, ground states exist for every value of the mass,
while, for every nonlinearity power between 4 (included) and 6 (excluded), a
mark of $L^2$-criticality arises, as ground states exist if and only if the
mass exceeds a threshold value that depends on the power. This phenomenon can
be interpreted as a continuous transition from a two-dimensional regime, for
which the only critical power is 4, to a one-dimensional behavior, in which
criticality corresponds to the power 6. We show that such a dimensional
crossover is rooted in the coexistence of one-dimensional and two-dimensional
Sobolev inequalities, leading to a new family of Gagliardo-Nirenberg
inequalities that account for this continuum of critical exponents.
