class_docstr: A fully convolutional model, i.e. a convolutional encoder and a
  convolutional decoder, as described in `"Convolutional Sequence to Sequence
  Learning" (Gehring et al., 2017) <https://arxiv.org/abs/1705.03122>`_.
  
  Args:
      encoder (FConvEncoder): the encoder
      decoder (FConvDecoder): the decoder
  
  The Convolutional model provides the following named architectures and
  command-line arguments:
  
  .. argparse::
      :ref: fairseq.models.fconv_parser
      :prog:
class_docstr_tok: ["A","fully","convolutional","model",",","i.e",".","a","convolutional","encoder","and","a","convolutional","decoder",",","as","described","in","`","``","Convolutional","Sequence","to","Sequence","Learning","''","(","Gehring","et","al.",",","2017",")","<","https",":","\/\/arxiv.org\/abs\/1705.03122",">","`","_",".","Args",":","encoder","(","FConvEncoder",")",":","the","encoder","decoder","(","FConvDecoder",")",":","the","decoder","The","Convolutional","model","provides","the","following","named","architectures","and","command-line","arguments",":","..","argparse",":",":",":","ref",":","fairseq.models.fconv_parser",":","prog",":"]
docstr: Build a new model instance.
docstr_tok: ["Build","a","new","model","instance","."]
code: def build_model(cls, args, task):
      """Build a new model instance."""
      # make sure that all args are properly defaulted (in case there are any new ones)
      base_architecture(args)
  
      encoder_embed_dict = None
      if args.encoder_embed_path:
          encoder_embed_dict = utils.parse_embedding(
              args.encoder_embed_path
          )
          utils.print_embed_overlap(
              encoder_embed_dict, task.source_dictionary
          )
  
      decoder_embed_dict = None
      if args.decoder_embed_path:
          decoder_embed_dict = utils.parse_embedding(
              args.decoder_embed_path
          )
          utils.print_embed_overlap(
              decoder_embed_dict, task.target_dictionary
          )
  
      encoder = FConvEncoder(
          dictionary=task.source_dictionary,
          embed_dim=args.encoder_embed_dim,
          embed_dict=encoder_embed_dict,
          convolutions=eval(args.encoder_layers),
          dropout=args.dropout,
          max_positions=args.max_source_positions,
      )
      decoder = FConvDecoder(
          dictionary=task.target_dictionary,
          embed_dim=args.decoder_embed_dim,
          embed_dict=decoder_embed_dict,
          convolutions=eval(args.decoder_layers),
          out_embed_dim=args.decoder_out_embed_dim,
          attention=eval(args.decoder_attention),
          dropout=args.dropout,
          max_positions=args.max_target_positions,
          share_embed=args.share_input_output_embed,
      )
      return FConvModel(encoder, decoder)
  
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.models import FairseqEncoder, FairseqEncoderDecoderModel, FairseqIncrementalDecoder, register_model, register_model_architecture
  from fairseq.modules import AdaptiveSoftmax, BeamableMM, FairseqDropout, GradMultiply, LearnedPositionalEmbedding, LinearizedConvolution
label_desc: Use image node_id 4 for calling the FConvModel obj's underlying member method code with example usage: obj.build_model(cls, args, task) and returns: FConvModel