Your life is never worth a photo, no matter how perfect the shot. You must have a healthy respect for the trains. At first it might seem that walking across the tracks is like crossing a street, but, there are many differences. Trains are less common than autos, and therefore an empty track gives the false impression of an unused track. Watch, look, listen, be on constant guard.
Trains often move faster than autos.
They can be upon you before you know it. Trains cannot stop like autos. YOU have to get out of the way. Many railroad routes are though older, often poorer sections of town. Venturing into these areas, alone, carrying valuable photo equipment is just asking for trouble.