// Creates a new neural layer, with the specified number of nodes and inputs
Creates a new neural layer, with the specified number of nodes and inputs
// Creates a new neural layer with the specified number of nodes and inputs
func createLayer(nodes, inputs int, act ActivationFunction) *Layer {
	inputs++
	layer := &Layer{
		Inputs: make([]float64, inputs),
		Nodes:  make([]*Node, nodes),
	}
	for i := 0; i < nodes; i++ {
		layer.Nodes[i] = &Node{
			Inputs:     layer.Inputs,
			Weights:    make([]float64, inputs),
			Activation: act,
		}
	}
	return layer
}
func createLayer ( nodes , inputs int , act ActivationFunction ) * Layer { inputs ++ layer := & Layer { Inputs : make ( [ ] float64 , inputs ) , Nodes : make ( [ ] * Node , nodes ) , } for i := 0 ; i < nodes ; i ++ { layer . Nodes [ i ] = & Node { Inputs : layer . Inputs , Weights : make ( [ ] float64 , inputs ) , Activation : act , } } return layer }
Creates a new neural layer, with the specified number of nodes and inputs
Creates a new neural layer with the specified number of nodes and inputs
// Add room for the x_j0 and w_0 bias