Skip to content

Commit

Permalink
Update python.js (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Aug 6, 2023
1 parent 13844a0 commit 9d73621
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -4870,6 +4870,12 @@ python.Execution = class {
}
throw new python.Error("Unsupported 'torch.neg' expression type.");
});
this.registerFunction('torch.pow', function(left, right) {
if (typeof left === 'number' && typeof right === 'number') {
return Math.pow(left, right);
}
throw new python.Error("Unsupported 'torch.pow' expression type.");
});
this.registerFunction('torch.q_scale', function(/* tensor */) {
return -1; // TODO
});
Expand Down

0 comments on commit 9d73621

Please sign in to comment.