Enhancing radioisotope identification in gamma spectra with transfer learning