class_docstr: Back Translation with hugging-face translation models.
  A sentence can only be transformed into one sentence at most.
class_docstr_tok: ["Back","Translation","with","hugging-face","translation","models",".","A","sentence","can","only","be","transformed","into","one","sentence","at","most","."]
docstr: :param str from_model_name: model to translate original language to
      target language
  :param str to_model_name: model to translate target language to
      original language
  :param device: indicate utilize cpu or which gpu device to
      run neural network
docstr_tok: [":","param","str","from_model_name",":","model","to","translate","original","language","to","target","language",":","param","str","to_model_name",":","model","to","translate","target","language","to","original","language",":","param","device",":","indicate","utilize","cpu","or","which","gpu","device","to","run","neural","network"]
code: def __init__(
      self,
      from_model_name=None,
      to_model_name=None,
      device=None,
      **kwargs,
  ):
      r"""
      :param str from_model_name: model to translate original language to
          target language
      :param str to_model_name: model to translate target language to
          original language
      :param device: indicate utilize cpu or which gpu device to
          run neural network
  
      """
      super().__init__()
      self.device = (
          self.get_device(device) if device else default_device
      )
      self.from_model_name = (
          from_model_name if from_model_name else TRANS_FROM_MODEL
      )
      self.to_model_name = (
          to_model_name if to_model_name else TRANS_TO_MODEL
      )
      self.from_model = None
      self.from_tokenizer = None
      self.to_model = None
      self.to_tokenizer = None
  
file_path: textflint/textflint/generation/transformation/UT/back_trans.py
imports: import torch
  from ..transformation import Transformation
  from ....common import device
  from ....common.settings import TRANS_FROM_MODEL, TRANS_TO_MODEL
label_desc: Use image node_id 1 to create a new BackTrans object from inherited base classes: Transformation with example: obj = BackTrans(from_model_name, to_model_name, device)