Does "train" mean the same thing in these two sentences?

A train of thought.

Unfortunately, the leading bridesmaid stepped on the bride's train as they were walking down the aisle.
different meanings