Mila (Canada) Interview Question

How do you define a custom layer with a hand crafted gradient function