Thanks ptrblck. I got an answer in the similar lines from stackoverflow here and I modified the code. It works.
Modified code, its output and some description is available at https://stackoverflow.com/questions/53332663/torchvision-0-2-1-transforms-normalize-does-not-work-as-expected/53337082#53337082 126