You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

menoh

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

menoh - npm Package Compare versions

Comparing version

to
1.0.1

4

package.json
{
"name": "menoh",
"version": "1.0.0",
"description": "MKL-DNN for NodeJS (a wrapper for Menoh).",
"version": "1.0.1",
"description": "NodeJS binding for Menoh DNN inference library.",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

# menoh
DNN interface library for NodeJS (powered by Menoh(c/c++) and MKL-DNN)
NodeJS binding for Menoh DNN inference library.

@@ -4,0 +4,0 @@ ## Requirements

@@ -439,2 +439,38 @@ 'use strict';

});
it('should throw if input data is too short', function () {
return menoh.create(ONNX_FILE_PATH)
.then((builder) => {
builder.addInput(MNIST_IN_NAME, [ batchSize, 1, 28, 28 ]);
builder.addOutput(MNIST_OUT_NAME);
const model = builder.buildModel({
backendName: 'mkldnn'
});
const tooShort = [0, 1, 2];
model.setInputData(MNIST_IN_NAME, tooShort); // should throw
})
.then(assert.fail, (err) => {
assert.ok(err instanceof Error);
assert.ok(err.message.includes('too short'));
});
});
it('should throw if input data is too long', function () {
return menoh.create(ONNX_FILE_PATH)
.then((builder) => {
builder.addInput(MNIST_IN_NAME, [ batchSize, 1, 28, 28 ]);
builder.addOutput(MNIST_OUT_NAME);
const model = builder.buildModel({
backendName: 'mkldnn'
});
const tooLong = data.concat([0.666]);
model.setInputData(MNIST_IN_NAME, tooLong); // should throw
})
.then(assert.fail, (err) => {
assert.ok(err instanceof Error);
assert.ok(err.message.includes('too long'));
});
});
});

@@ -441,0 +477,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet