
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Javascript package for analyzing Neural Networks.
npm install --save nnstats
The following show basic usage for analyzing CNN in Tensorflow (padding takes either SAME or VALID).
'use strict';
let nnStats = require('./');
let analyzer = nnStats.analyzer;
let utils = nnStats.utils;
let model = [{
'type': 'conv',
'filter': [5, 5, 32],
'strides': [1, 1],
'padding': 'SAME',
'datasize': 4
},{
'type': 'pool',
'filter': [2, 2],
'strides': [2, 2],
'padding': 'SAME',
'datasize': 4
},{
'type': 'conv',
'filter': [5, 5, 64],
'strides': [2, 2],
'padding': 'SAME',
'datasize': 4
},{
'type': 'pool',
'filter': [2, 2],
'strides': [2, 2],
'padding': 'SAME',
'datasize': 4
},{
'type': 'fc',
'hidden': 2048
},{
'type': 'fc',
'hidden': 1000
}]
let input = [28, 28, 1]
let options = {
tensorflow: true
}
let stats = analyzer.analyzeNetwork(model, input, options);
utils.report(stats);
Currently, here are 3 supported layers type: convolution layer (conv), pooling layer (pool), and fully-connected layer ('fc'). In all cases, type field is required in layer object to identity layer type.
Fields in conv layer:
filter: 3D array kernal size (height, width, outChannel).strides: 2D array strides size (height, width).padding: 2D array padding size (height, width).datasize (optional): number of byte of one value (for float32, this should be 4 because 32 / 8 = 4). This value is used to calculate how much memory needed for the network.Fields in pool layer:
filter: 2D array kernal size (height, width).strides: 2D array strides size (height, width).padding: 2D array padding size (height, width).datasize (optional): number of byte of one value (for float32, this should be 4 because 32 / 8 = 4). This value is used to calculate how much memory needed for the network.Fields in fc layer:
hidden: number of neurons in hiddent layers.https://knapsack-lab.github.io/nnstats/
Yeoman and Generator-simple-package
MIT © nghiattran
FAQs
Javascript package for analyzing Neural Networks.
We found that nnstats demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.