Skip to content

QR-decomposition fails on a specific matrix. #1058

Closed
@jarno-r

Description

@jarno-r

To get help from the community, check out our Google group.

TensorFlow.js version

0.14.1

Browser version

Node.js v8.12.0 without tfjs-node.

Describe the problem or feature request

QR decomposition returns NaNs for the invertible matrix [[0,2,2],[1,1,1],[0,1,2]], but works for some other matrices.

Code to reproduce the bug

"use strict";
exports.__esModule = true;
var tf = require("@tensorflow/tfjs");
var a = tf.tensor2d([[0, 2, 2], [1, 1, 1], [0, 1, 2]]);
var b = tf.tensor2d([[1, 2, 3], [4, 5, 6], [7, 8, 9]]);
{
    var _a = tf.linalg.qr(a), q = _a[0], r = _a[1];
    q.print();
    r.print();
}
{
    var _b = tf.linalg.qr(b), q = _b[0], r = _b[1];
    q.print();
    r.print();
}

Metadata

Metadata

Assignees

Labels

type:bugSomething isn't workingtype:supportuser support questions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions