Algolux Interview Question

Write a pytorch code for a simple problem