class_docstr: Overwrites the PyTorch TransformerEncoderLayer to use Darts' Position-wise Feed-Forward variants.
class_docstr_tok: ["Overwrites","the","PyTorch","TransformerEncoderLayer","to","use","Darts","'","Position-wise","Feed-Forward","variants","."]
code: def _ff_block(self, x: torch.Tensor) -> torch.Tensor:
      x = self.ffn(x)
      return self.dropout(x)
  
file_path: darts/darts/models/components/transformer.py
imports: import torch
  import torch.nn
  from darts.utils.torch import MonteCarloDropout
label_desc: Use image node_id 2 for calling the CustomFeedForwardEncoderLayer obj's underlying member method code with example usage: obj._ff_block(x) and returns: self