Context : Aims : We exploit deep observations of the GOODS-N field taken with PACS , the Photodetector Array Camera and Spectrometer , on board of Herschel , as part of the PACS Evolutionary Probe guaranteed time ( PEP ) , to study the link between star formation and stellar mass in galaxies to z \sim 2 . Methods : Starting from a stellar mass – selected sample of \sim 4500 galaxies with mag _ { 4.5 \mu m } < 23.0 ( AB ) , we identify \sim 350 objects with a PACS detection at 100 or 160 \mu m and \sim 1500 with only S pitzer 24 \mu m counterpart . Stellar masses and total IR luminosities ( L _ { IR } ) are estimated by fitting the Spectral Energy Distributions ( SEDs ) . Results : Consistently with other Herschel results , we find that L _ { IR } based only on 24 \mu m data is overestimated by a median factor \sim 1.8 at z \sim 2 , whereas it is underestimated ( with our approach ) up to a factor \sim 1.6 at 0.5 < z < 1.0 . We then exploit this calibration to correct L _ { IR } based on the MIPS/ Spitzer fluxes . These results clearly show how Herschel is fundamental to constrain L _ { IR } , and hence the SFR , of high redshift galaxies . Using the galaxies detected with PACS ( and/or MIPS ) , we investigate the existence and evolution of the relations between the star formation rate ( SFR ) , the specific star formation rate ( SSFR=SFR/mass ) and the stellar mass . Moreover , in order to avoid selection effects , we also repeat this study through a stacking analysis on the PACS images to fully exploit the far-IR information also for the Herschel and Spitzer undetected subsamples . We find that the SSFR-mass relation steepens with redshift , being almost flat at z < 1.0 and reaching a slope of \alpha = -0.50 ^ { +0.13 } _ { -0.16 } at z \sim 2 , at odds with recent works based on radio-stacking analysis at the same redshift . The mean SSFR of galaxies increases with redshift , by a factor \sim 15 for massive M > 10 ^ { 11 } M _ { \odot } galaxies from z = 0 to z = 2 , and seems to flatten at z > 1.5 in this mass range . Moreover , the most massive galaxies have the lowest SSFR at any z , implying that they have formed their stars earlier and more rapidly than their low mass counterparts ( downsizing ) . Conclusions :