I was wanting to know whether gradients are propagated through sampling layer. For example let’s say I have defined my own new custom Dropout layer where I can define the probability of the dropout for each node in a layer. The sampling operation is done through an external function. So wil lPyTorch raise an error or is everything ok?
NOTE: I have defined the dropout probabilities as a function of weights from previous layer.