Add RAVEN benchmark support with RavenDPL (--n_values 3|4) - #3
Open
jucamohedano wants to merge 16 commits into
Open
Add RAVEN benchmark support with RavenDPL (--n_values 3|4)#3jucamohedano wants to merge 16 commits into
jucamohedano wants to merge 16 commits into
Conversation
…set, encoder, and DPL model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for the RAVEN dataset (Zhang et al., 2019, "RAVEN: A Dataset for Relational and Analogical Visual Reasoning"), an analog of John C. Raven's 1938 Raven's Progressive Matrices for structural, relational, and analogical visual reasoning. Each problem is a matrix of grayscale panels, and the model selects the candidate that completes it. The
README.mddocuments the task and links to the data-generation instructions below.Added
rss/backbones/raven_encoder.py, shared panel encoder (RavenMLP).rss/datasets/raven.py, dataset registration, loaders, labels, backbone wiring.rss/datasets/utils/raven_creation.py, loads.npzpanels and.xmlconcept metadata.rss/models/ravendpl.py,RavenDPLfactorized DeepProbLog model.rss/models/utils/utils_problog.py, RAVEN logic matrices.rss/utils/{checkpoint,dpl_loss,losses,metrics,train}.py, RAVEN training, eval, diagnostics, checkpoints.rss/utils/args.py, adds--n_values(restricted to3or4, default3).README.md+.github/raven-example.png, task docs and attribution.Existing code is unaffected. The addition is purely additive. New model/dataset registrations,
argschoices with backward-compatible defaults, and the behavior changes inmetrics.py/train.pyare gated behindargs.dataset == "raven";checkpoint.py/train.pyroute artifacts through--output_dir(default".", so existing paths are preserved). The branch sits cleanly on top of upstreammainwith no divergence.Datasets. RAVEN panel data is generated and is not stored in this repo, using the reduced-dataset generator at jucamohedano/RAVEN (a fork of WellyZhang/RAVEN):
raven-3x3x3(commit65c6ba9), for the three-value dataset;raven-4x4x4(commit8fd5eb8), for the four-value dataset.From the chosen branch, generate the splits with its Python 2.7 environment:
The defaults (
--val 2 --test 2 --seed 1234) produce 3000 train / 1000 val / 1000 test. Use--save-dir <output>/RAVEN-4x4x4on theraven-4x4x4branch for the four-value dataset, then place the generated.npzpanels and matching.xmlconcept labels underrss/data, expected at: