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

confused with code #14

Open
allenwang2333 opened this issue Aug 8, 2023 · 1 comment
Open

confused with code #14

allenwang2333 opened this issue Aug 8, 2023 · 1 comment

Comments

@allenwang2333
Copy link

cfeaturecs = random_fourier_features_gpu(cfeaturec, num_f=num_f, sum=sum).cuda()

I think this cfeaturecs has shape of [B, D, H_rff], where B is batch size, D is number of features, and H_rff is size of RFF space.
However, the later for loop

for i in range(cfeaturecs.size()[-1]):
        cfeaturec = cfeaturecs[:, :, i]
        cov1 = cov(cfeaturec, weight)

The cfeaturec now is [B, D]. The last dimension is omitted. This does not correspond to the original equation, where the partial corss-covariance is calculated in the RFF space.

@Murphyzc
Copy link

I also found this problem, the partial cross-covariance is different from the orginal equation, have you figured it out?

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

2 participants