swim against the tide, go against the tide

Meaning 1
to swim against the tide or pull of the ocean
Sentence 1
You can get very tired and drown if you swim against the tide.
Meaning 2
to do something difficult, to do the opposite of everyone else
Sentence 2
I'm having trouble keeping up with my schoolwork. I'm swimming against the tide.