Within an effective Lagrangian model, we present calculations for cross sections of the dilepton production in proton-proton and proton-neutron collisions at laboratory kinetic energies in 1-5 GeV range. Production amplitudes include contributions from the nucleon-nucleon bremsstrahlung as well as from the mechanism of excitation, propagation, and radiative decay of ∆(1232) and N * (1520) intermediate baryonic resonances. It is found that the delta isobar terms dominate the cross sections in the entire considered beam energy range. Our calculations are able to explain the data of the DLS collaboration on the dilepton production in proton-proton collisions for beam energies below 1.3 GeV. However, for incident energies higher than this the inclusion of contributions from other dilepton sources like Dalitz decay of π 0 and η mesons, and direct decay of ρ 0 and ω mesons is necessary to describe the data.25.75. Dw, 13.30.Ce, 12.40.Yx