kimhc6028 / relational-networks

Pytorch implementation of "A simple neural network module for relational reasoning" (Relational Networks)
https://arxiv.org/pdf/1706.01427.pdf
BSD 3-Clause "New" or "Revised" License
811 stars 162 forks source link

Using Dataset #22

Closed slerman12 closed 4 years ago

slerman12 commented 5 years ago

Hi, I'm trying to find a source for the Sort-of-CLEVR Dataset. The provided code in this repository seems to be what I'm looking for, but I need help understanding how to set it up for training, validation, and testing. Could you provide a brief example of how the included code could be used to generate a training, validation, and testing set, and then from this, iterate through these datasets in batches of chosen size?

slerman12 commented 5 years ago

For example, I tried rel_train, rel_test, norel_train, norel_test = load_data(), but I'm confused as to what these datasets contain. Each item seems to constitute a 3 x 3 x 75 x 75 dimension array, or I could be wrong. Can you clarify how this data maps back to the images, questions, and answers described in the dataset overview? Thank you for any help.

holopekochan commented 5 years ago

I think you can check it in sort_of_clevr_generator.py The idea is very simple inside. It just generates questions in one hot vector and pair the questions and answer to the object

slerman12 commented 5 years ago

Could you possibly show me a code example for how to retrieve the image, question, and answer (or a batch of them)?

What I got so far is: rel_train, rel_test, norel_train, norel_test = load_data().