Skip to content

Trouble running code with CovarianceMatrix(sqrt=True) #108

@turmeric-blend

Description

@turmeric-blend

Merry Christmas @jankrepl

I am having trouble running code with:

cov_layer = CovarianceMatrix(sqrt=True)
...
covmat_sqrt = cov_layer(rets)

I was wondering if this would be an equivalent replacement?:

cov_layer = CovarianceMatrix(sqrt=False)
...
covmat_sqrt = torch.sqrt(cov_layer(rets))

Just in case you were curious, the error I was getting with CovarianceMatrix(sqrt=True):

rets has NAN
warnings.warn('rets has NAN')
....
Intel MKL ERROR: Parameter 4 was incorrect on entry to SLASCL.
....
/deepdow/layers/misc.py", line 162, in compute_sqrt
_, s, v = m.svd()
RuntimeError: svd_cuda: the updating process of SBDSDC did not converge (error: 16)

However, when I checked rets before passing into cov_layer with assert torch.all(torch.isnan(rets)), no assert error occured.

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