FFFF Answer Prediction Code · Issue #11 · showlab/mist · GitHub
[go: up one dir, main page]

Skip to content

Answer Prediction Code #11

Open
Open

Description

@jfliang3324

Hi, I want to know why you stacked the 0th dimension when predicting the answer ?
# final answer prediction
fusion_proj = torch.sum(torch.stack([out[:, 0, :] for out in out_list], dim=-1), dim=-1)
fusion_proj = self.vqproj(fusion_proj)

Activity

  1. yangk-910 commented on Oct 25, 2023

    @yangk-910

    Hello, how did you get your answer and how many dimensions is its shape? The answer I got according to the official code has only one dimension, i.e. the serial number corresponding to answer_txt, and feeding an answer with only one dimension into the bert model gives me an error: "ValueError: not enough values to unpack (expected 2, got 1)" (Figure 1 and Figure 2). If I do the same thing to answer_txt as question_txt, and get a two-dimensional "answer", the answer that I get when I feed it into the bert model, answer_proj, has only two dimensions, and can't be used with fusion_proj to do the torch.bmm operation, and do you know why, when you load data "answer_id" and "answer" both return the variable answer_id?
    image
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0