Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on sort_of_clevr_generator "count+4" #29

Open
lizhenstat opened this issue Jan 16, 2021 · 1 comment
Open

Question on sort_of_clevr_generator "count+4" #29

lizhenstat opened this issue Jan 16, 2021 · 1 comment

Comments

@lizhenstat
Copy link

Hi, thanks for your work and sharing of the code!!!
I have on question on data generation part,
I know the questions and answers are represented in one-hot vectors
where
questions = 2 x (6 for one-hot vector of color), 3 for question type(binary, ternary, norel), 3 for question subtype
answers = yes, no, rectangle, circle, r, g, b, o, k, y

My question is why you use count+4 in here bianry question-subtype 3, which is as follows:

  elif subtype == 2:
      """count->1~6"""
      my_obj = objects[color][2]
      count = -1
      for obj in objects:
          if obj[2] == my_obj:
              count +=1 
      answer = count+4

As I understand, the count is already the number of Number of objects which have the same shape with the certain colored object.
The +4 in [ yes, no, rectangle, circle, r, g, b, o, k, y] means the colors?

Any help would be appreciated and thanks for your time

@dalek7
Copy link

dalek7 commented Aug 19, 2021

Same question here.

Presumably, given that there are NO color-related questions in case of the binary question (i.e., question[q_type_idx+1] = 1), it seems to be intended to use count information from index 4.
So, the answer variable means [yes, no, rectangle, circle, 0,1, 2, 3, 4, 5] in case of the binary question.
This is for the case of the relational question; “How many objects have the same shape as the green object?”, described in the original paper.

Correct me if i am wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants