Skip to content

confused with code #14

@allenwang2333

Description

@allenwang2333
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions