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 Apr 2, 2023
1 parent 4eb4d21 commit 6346e26
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -4185,6 +4185,18 @@ python.Execution = class {
this.registerFunction('builtins.uninitialized', function(/* type */) {
return undefined;
});
this.registerFunction('ops.prepacked.linear_clamp_prepack', function(W, B, output_min, output_max) {
const params = self.invoke('__torch__.torch.classes.xnnpack.LinearOpContext', []);
params.weight = W;
params.bias = B;
if (output_min !== undefined) {
params.output_min = output_min;
}
if (output_max !== undefined) {
params.output_max = output_max;
}
return params;
});
this.registerFunction('ops.prim.data', function(tensor) {
return tensor;
});
Expand Down

0 comments on commit 6346e26

Please sign in to comment.