Code Monkey home page Code Monkey logo

Comments (18)

csingh27 avatar csingh27 commented on September 27, 2024

Number of samples = n_ways * k_shots * q_shots

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

Updated shape of X and kept it similar to that of mini-imagenet

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

config file n_way, k_shots, q_shots

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

n_way should be less than the number of classes in train set and number of classes in test set
n_way should be less than k_shots + q_shots

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

k_shots + q_shots < population

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

n_way < min(total number of ways in train, test, and validation)

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

Draws population in sets of 6 -
n_ways = 5, k_shots = 5, q_shots = 1
n = Population size, k = k_shots + q_shots
Population= [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] n= 9 k= 5
Population= [18, 19, 20, 21, 22, 23] n= 6 k= 6
Population= [30, 31, 32, 33, 34, 35] n= 6 k= 6
Population= [36, 37, 38, 39, 40, 41] n= 6 k= 6
Population= [42, 43, 44, 45, 46, 47] n= 6 k= 6
Population= [12, 13, 14, 15, 16, 17] n= 6 k= 6

Population= [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] n= 9 k= 5
Population= [18, 19, 20, 21, 22, 23] n= 6 k= 6
Population= [36, 37, 38, 39, 40, 41] n= 6 k= 6
Population= [0, 1, 2, 3, 4, 5] n= 6 k= 6
Population= [24, 25, 26, 27, 28, 29] n= 6 k= 6
Population= [48] n= 1 k= 6

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

Draws population in sets of 6 -
n_ways = 5, k_shots = 1, q_shots = 1
n = Population size, k = k_shots + q_shots
Training ... iter: 0
Population= [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] n= 9 k= 5
Population= [0, 1, 2, 3, 4, 5] n= 6 k= 2
Population= [42, 43, 44, 45, 46, 47] n= 6 k= 2
Population= [36, 37, 38, 39, 40, 41] n= 6 k= 2
Population= [18, 19, 20, 21, 22, 23] n= 6 k= 2
Population= [6, 7, 8, 9, 10, 11, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119] n= 77 k= 2

Population= [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] n= 9 k= 5
Population= [6, 7, 8, 9, 10, 11, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119] n= 77 k= 2
Population= [36, 37, 38, 39, 40, 41] n= 6 k= 2
Population= [18, 19, 20, 21, 22, 23] n= 6 k= 2
Population= [48] n= 1 k= 2

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

k = n_ways for the first population set
k = k_shots + q_shots for the next 6 population sets

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

k should always be less than or equal to n

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

Seen values of n: 6, 77, 1, 5, 9

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

n is the sampled population set:

  • And randomly samples a task from the dataset (It generates a random index i within the range of the number of tasks in the dataset)
  • It calls the getitem(self, i) method to retrieve the task at the selected index.

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

num_tasks: The number of tasks to generate.

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

Sample() Chooses k unique random elements from a population sequence or set

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

CythonFusedNWaysKShots() function in the transforms.pyx file

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

File "/home/dfki.uni-bremen.de/csingh/DFKI/PhysWM/trident_primitives/src/trident_train.py", line 101, in
ttask = train_tasks.sample()
File "learn2learn/data/task_dataset.pyx", line 158, in learn2learn.data.task_dataset.CythonTaskDataset.sample
File "learn2learn/data/task_dataset.pyx", line 169, in learn2learn.data.task_dataset.CythonTaskDataset.getitem
File "learn2learn/data/task_dataset.pyx", line 133, in learn2learn.data.task_dataset.CythonTaskDataset.sample_task_description
File "learn2learn/data/transforms.pyx", line 415, in learn2learn.data.transforms.CythonFusedNWaysKShots.call
File "learn2learn/data/transforms.pyx", line 402, in learn2learn.data.transforms.CythonFusedNWaysKShots.new_task
File "/home/dfki.uni-bremen.de/csingh/anaconda3/lib/python3.9/random.py", line 452, in sample

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

index = A random number from 0 to len(dataset) 120

from trident_primitives.

csingh27 avatar csingh27 commented on September 27, 2024

Initial value of n is always 9 and initial value of k is always n_ways and the population points to the labels

from trident_primitives.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.