Skip to content

Commit

Permalink
Update om.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Jul 6, 2024
1 parent aa75081 commit 263ee4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/om.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ om.Utility = class {
}

static tensorType(desc) {
if (desc.shape && Array.isArray(desc.shape.dim)) {
if (desc && desc.shape && Array.isArray(desc.shape.dim)) {
const dataType = desc && desc.dtype ? om.Utility.dtype(desc.dtype) : '?';
const shape = new om.TensorShape(desc.shape.dim);
return new om.TensorType(dataType, shape, desc.layout);
Expand Down

0 comments on commit 263ee4d

Please sign in to comment.