Skip to content

Commit

Permalink
revised constant.js and constant_test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mei1127 committed Dec 21, 2023
1 parent 902bcd9 commit a4d684c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export function constant(start, step, outputShape, type = 'float32') {
resultArray.push(start + i * step);
}
const resultToTensor = new Tensor([resultArray.length], resultArray);

const transformTensorType = cast(resultToTensor, type);
const output = new Tensor(outputShape, transformTensorType.data);
return output;
Expand Down
2 changes: 0 additions & 2 deletions test/constant_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import * as utils from './utils.js';
describe('test constant', function() {
function testConstant(start, step, outputShape, type, expected) {
const outputTensor = constant(start, step, outputShape, type);
console.log('outputTensor', outputTensor);
console.log('expected', expected);
utils.checkShape(outputTensor, expected.shape);
utils.checkValue(outputTensor, expected.data);
}
Expand Down

0 comments on commit a4d684c

Please sign in to comment.