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

Center of volume #21

Open
oattao opened this issue Mar 17, 2020 · 8 comments
Open

Center of volume #21

oattao opened this issue Mar 17, 2020 · 8 comments

Comments

@oattao
Copy link

oattao commented Mar 17, 2020

We don't need to update value of c (center of volume) during the training?

@snowood1
Copy link

We don't need to update value of c (center of volume) during the training?

I think in the code he didn't update R ( in deepSVDD_trainer.py)

@oattao
Copy link
Author

oattao commented Apr 26, 2020

Do you think that he was wrong?

@snowood1
Copy link

Do you think that he was wrong?

Yes. I think this pytorch version is incomplete compared to the orginal version written in Theano.
In this version, one class training and block coordinate optimization is not finished.

@jhl13
Copy link

jhl13 commented May 9, 2020

Do you think that he was wrong?

Yes. I think this pytorch version is incomplete compared to the orginal version written in Theano.
In this version, one class training and block coordinate optimization is not finished.

deepSVDD_trainer.py
line 94
self.R.data = torch.tensor(get_radius(dist, self.nu), device=self.device)the

I think R is updated. However, according to the paper, the dist should be sorted, but I don't find any code to do this.

@jhl13
Copy link

jhl13 commented May 9, 2020

We don't need to update value of c (center of volume) during the training?

Yes, We don't need to update the value of c (center of volume) during the training.

@BenedictGreen
Copy link

Hi,
thanks for the discussion.
I also noticed the same problem. The paper said that "we found that fixing c in the neighborhood of the initial network outputs made SGD convergence faster and more robust ---(in 3.3 Proposition 1)".I think that mean that 'center' don't need to update.

Was that mean that regard 'center' as a constant made no difference to the result. In other words, theoretically define the 'center' as any constant which satisfy the right shape could also made the model work.

AM I right?

@GabrielDornelles
Copy link

GabrielDornelles commented Jul 15, 2022

As you first pre-train the model with an autoencoder, you have pretty good representations in the latent space.
When you start training the Encoder only part, you could find two scenarios:

  1. You only have good samples of your class, and thus, taking the mean of this points in the latent space will just do it, since you want this C point to be close to every other point of good sample.
  2. You have good and anomalous samples, and averaging them all will converge the center C to the most represented type in the dataset (like you can see some specific views of planes in cifar-10, or specific shapes of numbers in mnist).

So, no, I don't see any reason why you would update the center during training, but the radius on the other hand, is what makes the edge between anomalous or not, and it is updated during training.

But I don't think you cant initialize it anyway, they initialize and keep it as the mean of one forward pass on your training data.

@ZPP2000
Copy link

ZPP2000 commented Jul 1, 2023

Hi,I have a question about this code .when there is no pretraining process, what should i do about Initializing the center of the sphere?

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

6 participants