From 793e8d574141c6483b69a2ad72e15479ed0e6f82 Mon Sep 17 00:00:00 2001 From: Ulysse McConnell Date: Tue, 2 Jul 2019 16:27:01 +0200 Subject: [PATCH] Format jsdoc comments --- lib/index.js | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/lib/index.js b/lib/index.js index b05b770..51f8b9d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -113,7 +113,8 @@ export class Layer { /** * Adds Biases object to layer - * @param {Biases} biases biases object from Biases constructor; belongs to ouput layer + * @param {Biases} biases biases object from Biases constructor; belongs to + * ouput layer * @example * let inputLayer = new Layer(5); * let outputLayer = new Layer(2); @@ -130,7 +131,8 @@ export class Layer { /** * Adds Weights object to layer - * @param {Weights} weights weights object from Weights constructor; belongs to input layer + * @param {Weights} weights weights object from Weights constructor; belongs + * to input layer * @example * let inputLayer = new Layer(5); * let outputLayer = new Layer(2); @@ -151,7 +153,8 @@ export class Layer { /** * Applys given function to all neurons of the layer - * @param {Function} func mapping function called with neuron value and index + * @param {Function} func mapping function called with neuron value and + * index * @example * outputLayer.apply(sigmoid); * @returns layer @@ -180,7 +183,8 @@ export class Layer { /** * Populates neurons with data - * @param {Array} data array of data to populate layer / neurons with; must be same length as layer + * @param {Array} data array of data to populate layer / neurons with; must + * be same length as layer * @returns layer */ populate(data) { @@ -193,7 +197,8 @@ export class Layer { } /** - * Runs connection between two layers by applying weights to input layer's neurons and biases to resulting output layer's neurons + * Runs connection between two layers by applying weights to input layer's + * neurons and biases to resulting output layer's neurons * @example * let inputLayer = new Layer(5); * let outputLayer = new Layer(2); @@ -234,14 +239,16 @@ export class Layer { export class Network extends Array { /** * Creates a neural network with given layers - * @param {Array} layers array of Layer objects or numbers representing layer length + * @param {Array} layers array of Layer objects or numbers representing + * layer length */ constructor(layers) { super(...layers.map(el => (el instanceof Layer ? el : new Layer(el)))); } /** - * Adds randomly filled bias matrix with correct dimensions to every layer by calling Biases constructor + * Adds randomly filled bias matrix with correct dimensions to every layer + * by calling Biases constructor * @returns {Network} */ addBiases() { @@ -254,7 +261,8 @@ export class Network extends Array { } /** - * Adds randomly filled weight matrix with correct dimensions to every layer by calling Weights constructor + * Adds randomly filled weight matrix with correct dimensions to every layer + * by calling Weights constructor * @returns {Network} */ addWeights() { @@ -270,7 +278,8 @@ export class Network extends Array { /** * Applies a function to every layer by calling layer.apply() on every layer - * @param {Function} func mapping function called on every layer with layer.apply() + * @param {Function} func mapping function called on every layer with + * layer.apply() * @returns {Network} */ apply(func) {