class_docstr: ## 1D Convolution Compression $f_c$
  
  This is a simple wrapper around
  [`nn.Conv1d`](https://pytorch.org/docs/stable/generated/torch.nn.Conv1d.html)
  with some tensor dimension permutations.
docstr: * `compression_rate` $c$
  * `d_model` is the embedding size
docstr_tok: ["*","`","compression_rate","`","$","c","$","*","`","d_model","`","is","the","embedding","size"]
code: def __init__(self, compression_rate: int, d_model: int):
      """
      * `compression_rate` $c$
      * `d_model` is the embedding size
      """
      super().__init__()
      self.conv = nn.Conv1d(
          d_model,
          d_model,
          kernel_size=compression_rate,
          stride=compression_rate,
      )
  
imports: from typing import Optional, List
  import torch
  import torch.nn.functional
  from torch import nn
  from labml_helpers.module import Module, TypedModuleList
  from labml_nn.transformers.feed_forward import FeedForward
  from labml_nn.transformers.mha import PrepareForMultiHeadAttention
  from labml_nn.transformers.xl.relative_mha import RelativeMultiHeadAttention
  from labml_nn.utils import clone_module_list
label_desc: Use image node_id 1 to create a new Conv1dCompression object from inherited base classes: Module with example: obj = Conv1dCompression(compression_rate, d_model)