I think the verb "remember" in the sentences act as the main verb and are supposed to be a normal verb that change its tenses accordingly. In your examples, "remember" will have the same meaning despite it is followed by a gerund (phrase) or to-infinitives. But honestly, I'm not sure if the verb "remember" qualifies to be followed by to-infinitives.
look at these:
"I love to sleep" (verb follwed by a to-infinitive)
"I love sleeping." (verb followed by a gerund)
the verb "love" here doesn't change, does it?