class_docstr: Temporal Convolution Encoder
  
  Receives `x` input of dim [N,T,C_in], permutes it to  [N,C_in,T]
  applies a deep stack of exponentially dilated causal convolutions.
  The exponentially increasing dilations of the convolutions allow for
  the creation of weighted averages of exponentially large long-term memory.
  
  **Parameters:**<br>
  `in_channels`: int, dimension of `x` input's initial channels.<br>
  `out_channels`: int, dimension of `x` outputs's channels.<br>
  `kernel_size`: int, size of the convolving kernel.<br>
  `dilations`: int list, controls the temporal spacing between the kernel points.<br>
  `activation`: str, identifying activations from PyTorch activations.
      select from 'ReLU','Softplus','Tanh','SELU', 'LeakyReLU','PReLU','Sigmoid'.<br>
  
  **Returns:**<br>
  `x`: tensor, torch tensor of dim [N,T,C_out].<br>
class_docstr_tok: ["Temporal","Convolution","Encoder","Receives","`","x","`","input","of","dim","[","N",",","T",",","C_in","]",",","permutes","it","to","[","N",",","C_in",",","T","]","applies","a","deep","stack","of","exponentially","dilated","causal","convolutions",".","The","exponentially","increasing","dilations","of","the","convolutions","allow","for","the","creation","of","weighted","averages","of","exponentially","large","long-term","memory",".","*","*","Parameters",":","*","*","<","br",">","`","in_channels","`",":","int",",","dimension","of","`","x","`","input","'s","initial","channels.","<","br",">","`","out_channels","`",":","int",",","dimension","of","`","x","`","outputs","'s","channels.","<","br",">","`","kernel_size","`",":","int",",","size","of","the","convolving","kernel.","<","br",">","`","dilations","`",":","int","list",",","controls","the","temporal","spacing","between","the","kernel","points.","<","br",">","`","activation","`",":","str",",","identifying","activations","from","PyTorch","activations",".","select","from","'ReLU","'",",","'Softplus","'",",","'Tanh","'",",","'SELU","'",",","'LeakyReLU","'",",","'PReLU","'",",","'Sigmoid'.","<","br",">","*","*","Returns",":","*","*","<","br",">","`","x","`",":","tensor",",","torch","tensor","of","dim","[","N",",","T",",","C_out","]",".","<","br",">"]
code: def forward(self, x):
      # [N,T,C_in] -> [N,C_in,T] -> [N,T,C_out]
      x = x.permute(0, 2, 1).contiguous()
      x = self.tcn(x)
      x = x.permute(0, 2, 1).contiguous()
      return x
  
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the TemporalConvolutionEncoder obj's underlying member method code with example usage: obj.forward(x) and returns: x