Git Product home page Git Product logo

Comments (2)

Codefmeister avatar Codefmeister commented on July 21, 2024

Sorry for such meaningless question as a newbee.
I have understood the covariance estimation in SWAG. And I will note it here for other new boys,
(1) The inference do not need the calculation of covariance matrix, instead, during training, sqrt of covariance matrix is saved, which can be used for inference.
$$\widetilde{\theta}=\theta_{\mathrm{SWA}}+\frac{1}{\sqrt{2}} \cdot \Sigma_{\mathrm{diag}}^{\frac{1}{2}} z_1+\frac{1}{\sqrt{2(K-1)}} \widehat{D} z_2, \quad \text { where } z_1 \sim \mathcal{N}\left(0, I_d\right), z_2 \sim \mathcal{N}\left(0, I_K\right)$$

(2) In Section 4, the eigvector of covariance matrix is calculated by SVD. The mathmetical foundation is that: If $C = A^{T}A$, the SVD of $A$ is denoted by $A = U \Sigma V^T$, the $U$ here is composed of the eigvectors of $C$.

So there is no need for the calculation of covariance matrix. It's a fantastic trick to aviod the large computation budget.

from swa_gaussian.

MosGeo avatar MosGeo commented on July 21, 2024

@Codefmeister Can you eloprate on how you solved the issue. I am having the same issue. From my understanding, you still have to calculate the covarience as you are trying to store the sqrt of the convarience matrix and you will hit the same wall?

from swa_gaussian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.