attention_from_scratch using pytorch