It depends, some apply dropout before activation while others apply it after the activation. However, in the case of ReLU these 2 methods should be equivalent.
2.Yes, u should look for whether the model is in “train” or “eval”. I remember there’s a function/attribute called “training”.
3.U should take a closer look at how inverted dropout work(well I suggest u also take a look at how normal dropout work). It’s quite simple to implement.