I want to see the code for nn.Dropout, while staying in google colab, I ctrl+click on nn.Dropout, it takes me to dropout.py, which has Dropout class, and returns
F.dropout(input, self.p, self.training, self.inplace)
so I ctrl+click on F.dropout, it takes me to functional.py
where something like this is returned
return (_VF.dropout_(input, p, training)
if inplace
else _VF.dropout(input, p, training))
now I am stuck, because this is builtin, and no option to go beyond this.
only way is to search for this in github.
this happens multiple times for a lot of builtin_function_or_method, for example searching for view, permute, all are builtin_function_or_method, so cannot access their implementation from colab notebook.