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

TypeError: __init__() takes 2 positional arguments but 3 were given 1 #1

Open
NIEYALI opened this issue Nov 1, 2021 · 0 comments
Open

Comments

@NIEYALI
Copy link

NIEYALI commented Nov 1, 2021

Hi
I tried to run it, but met problems following: could you help figure out what's wrong?


TypeError Traceback (most recent call last)
in ()
59 data_label = [s[1] for s in dataset.samples]
60
---> 61 ss = StratifiedSampler(torch.FloatTensor(data_label), test_size)
62 pre_train_indices, test_indices = ss.gen_sample_array()
63 # The "pre" is necessary to use array to identify train/ val indices with indices generated by second sampler

TypeError: init() takes 2 positional arguments but 3 were given
1

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

1 participant