mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-12 17:57:38 +00:00
* add web * add script and test * fix lint * add test/data/ops * add test/data/node/ to gitignore * modify scripts * add onnxjs * fix tests * fix test-runner * fix sourcemap * fix onnxjs profiling * update test list * update README * resolve comments * set wasm as default backend * rename package * update copyright header * do not use class "Buffer" in browser context * revise readme
22 lines
923 B
TypeScript
22 lines
923 B
TypeScript
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
import {Dropout} from '../../../ops/dropout';
|
|
import {Tensor} from '../../../tensor';
|
|
import {WebGLInferenceHandler} from '../inference-handler';
|
|
import {ProgramInfo, RunData, WebGLOperator} from '../types';
|
|
|
|
export class WebGLDropout extends Dropout implements WebGLOperator {
|
|
run(inferenceHandler: WebGLInferenceHandler, inputs: Tensor[]): Tensor[] {
|
|
if (this.testMode) {
|
|
return [inputs[0]];
|
|
}
|
|
throw new Error('Non test mode Dropout is not implemented yet');
|
|
}
|
|
createProgramInfo(_handler: WebGLInferenceHandler, _inputs: Tensor[]): ProgramInfo {
|
|
throw new Error('Non test mode Dropout is not implemented yet');
|
|
}
|
|
createRunData(_handler: WebGLInferenceHandler, _programInfo: ProgramInfo, _inputs: Tensor[]): RunData {
|
|
throw new Error('Non test mode Dropout is not implemented yet');
|
|
}
|
|
}
|