Efficient Combination of Rematerialization and Offloading for Training DNNs