Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
[WebGL] improve RESHAPE
Browse files Browse the repository at this point in the history
  • Loading branch information
GreyZzzzzzXh committed Dec 5, 2018
1 parent d9788ef commit af02c9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/nn/webgl/WebGLModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ export default class WebGLModel {
const input = operands[inputs[0]];
const targetShape = operands[inputs[1]];
const output = operands[outputs[0]];
output.assign(input.reshape(targetShape.dataSync()));
if (targetShape.value === undefined) {
targetShape.value = targetShape.dataSync();
}
output.assign(input.reshape(targetShape.value));
} break;
case OperationCode.CONCATENATION: {
const numInputTensors = inputs.length - 1;
Expand Down

0 comments on commit af02c9c

Please sign in to comment.