ISubGVQA.models.question_decoder ================================ .. py:module:: ISubGVQA.models.question_decoder Classes ------- .. autoapisummary:: ISubGVQA.models.question_decoder.QuestionDecoder Module Contents --------------- .. py:class:: QuestionDecoder(n_instructions, ninp, nhead, nhid, nlayers, dropout=0.1) Bases: :py:obj:`torch.nn.Module` .. py:attribute:: model_type :value: 'Transformer' .. py:attribute:: num_queries .. py:attribute:: query_embed .. py:attribute:: coarse_decoder .. py:method:: generate_square_subsequent_mask(sz) Generate a square mask for the sequence. The masked positions are filled with float('-inf'). Unmasked positions are filled with float(0.0). https://pytorch.org/docs/stable/_modules/torch/nn/modules/transformer.html#Transformer.generate_square_subsequent_mask .. py:method:: forward(memory)