RuntimeError: The size of tensor a (2) must match the size of tensor b (96) at non-singleton dimension 1

I am having the same error for a binary classification for tabular, I have tried the following:

acc_imb = partial(accuracy_thresh, thresh=0.1)
m = tabular_learner(data, layers=[1000,500], metrics=[acc_imb])

m = tabular_learner(data, layers=[500,250], metrics=[accuracy_thresh(thresh=0.1)])

In both cases I get:
RuntimeError: The size of tensor a (2) must match the size of tensor b (64) at non-singleton dimension 1

4 Likes