How to use pytorch to process variance sequence

i want to use pytorch to handle different length sequence。