Skip to content

Permute MNIST by row #932

Answered by kushalj001
kushalj001 asked this question in Q&A
Mar 10, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Thanks for the reply, can you take a brief look at this implementation? I have only changed 2 lines. In the PermutedMNIST method, instead of creating a random permutation of 784, I create a permutation of 28. (This can be dynamic by taking in an additional parameter in the function like sequence_length or pixel_per_input, which by default could be 1).

def PermutedMNIST(
    n_experiences: int,
    *,
    seed: Optional[int] = None,
    train_transform: Optional[Any] = _default_mnist_train_transform,
    eval_transform: Optional[Any] = _default_mnist_eval_transform,
    dataset_root: Union[str, Path] = None
) -> NCScenario:
  
    list_train_dataset = []
    list_test_dataset = []
    rng_…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@AndreaCossu
Comment options

Answer selected by vlomonaco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Benchmarks Related to the Benchmarks module
3 participants