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

RuntimeError, when using ICL model #17

Closed
943fansi opened this issue Dec 10, 2022 · 1 comment
Closed

RuntimeError, when using ICL model #17

943fansi opened this issue Dec 10, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@943fansi
Copy link

RuntimeError: Trying to create tensor with negative dimension -1: [100, -1]

x_train shape [4320, 1]
x_test shape [4320, 1]

modelL = {0: DeepSVDD, 1: REPEN, 2: RDP, 3: RCA, 4: GOAD, 5: ICL}
model_name = ["SVDD", "REPEN", "RDP", "RCA", "GOAD", "ICL"]
for index in range(1, 6):
    model = modelL[index]()
    model.fit(x_train, y=None)
    score = model.decision_function(x_test)
        self.enc_f_net = MLPnet(
            n_features=n_features-kernel_size,
            n_hidden=hidden_dims,
            n_output=rep_dim,
            mid_channels=len(self.all_idx),
            batch_norm=True,
            activation=f_act,
            bias=bias,
        )

here, n_features=1 and kernel_size=2, and then it got -1

@xuhongzuo
Copy link
Owner

ICL is a self-supervised model that learns the mapping of sub-vectors and the remaining parts. If the input only contains one feature, ICL cannot handle this case.

Thanks for raising this issue, I will add a check_array function in this model.

@xuhongzuo xuhongzuo self-assigned this Dec 11, 2022
@xuhongzuo xuhongzuo added the bug Something isn't working label Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants