You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: