Dropout faster without stacked RNN - PyTorch Forums
discuss.pytorch.org › t › dropout-faster-withoutJan 14, 2021 · Hello, It seems faster to put the dropout outside of the stacked RNN module. Note that this is not true without the bidirectional case. Can you explain what makes this difference ? def std_fw(rnn, src): return rnn(src) def split_fw(rnn1, rnn2, rnn3, dropout, src): output, _ = rnn1(src) output = torch.nn.utils.rnn.PackedSequence( torch.nn.functional.dropout(output.data, dropout, True), batch ...
hanzhanggit/StackGAN-Pytorch - GitHub
https://github.com/hanzhanggit/StackGAN-Pytorch25.02.2018 · Pytorch implementation for reproducing COCO results in the paper StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks by Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaogang Wang, Xiaolei Huang, Dimitris Metaxas. The network structure is slightly different from the tensorflow implementation.
RNN — PyTorch 1.10.1 documentation
pytorch.org › docs › stableE.g., setting num_layers=2 would mean stacking two RNNs together to form a stacked RNN, with the second RNN taking in outputs of the first RNN and computing the final results. Default: 1. nonlinearity – The non-linearity to use. Can be either 'tanh' or 'relu'.