In the present paper, in view of the variational approach, we consider the existence of positive weak solutions for a class of the double phase problem where $N\geq 2$ and $1<p<q<N$, $\alpha,\beta,\lambda,\mu$ are positive real numbers, $V_1$ and $V_2$ are weight functions in generalized Lebesgue spaces $L^{s_1}(\Omega)$ and $L^{s_2}(\Omega)$ respectively such that $V_1$ may change sign in $\Omega$ and $V_2\geq 0$ on $\Omega$.