Skip to content

Commit

Permalink
Merge pull request #2 from jlewis-austin/master
Browse files Browse the repository at this point in the history
Global update dimensions to shape in operand descriptors
  • Loading branch information
sushanthr authored Oct 31, 2024
2 parents cc87d98 + a187132 commit e58a5b6
Show file tree
Hide file tree
Showing 3 changed files with 705 additions and 705 deletions.
4 changes: 2 additions & 2 deletions SWOps.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function InstallCpuOps(builder) {
// float case
let array_buffer_view = new Float32Array(new ArrayBuffer(4));
array_buffer_view[0] = val;
return builder.constant({type: 'float32', dataType: 'float32', dimensions: [1]}, array_buffer_view);
return builder.constant({type: 'float32', dataType: 'float32', shape: [1]}, array_buffer_view);
}
throw("GenerateMLOperandFromNumber non float is not yet implemented.");
}
Expand Down Expand Up @@ -79,4 +79,4 @@ function InstallCpuOps(builder) {
builder.gather = gather(builder.gather);
builder.unsqueeze = unsqueeze(builder.unsqueeze);
builder.concat = concat(builder.concat);
}
}
2 changes: 1 addition & 1 deletion index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
InstallCpuOps(builder);

const operandType = {type: 'float32',
dataType: 'float32', dimensions: [1, 3, tensor.height, tensor.width]};
dataType: 'float32', shape: [1, 3, tensor.height, tensor.width]};
const input_operand = builder.input('input', operandType);
const output_operand = loadModelGraph(input_operand, weights_buffer, builder);
const graph = await builder.build({'output': output_operand});
Expand Down
Loading

0 comments on commit e58a5b6

Please sign in to comment.