network.rb
# Push hidden layers onto the stack.
Push hidden layers onto the stack.
Push hidden layers onto the stack .
def pushHiddenLayer(layer)
		if layer.kind_of?(NetworkLayer)
			l = layer
		elsif layer.kind_of?(Fixnum)
			l = NetworkLayer.new(layer)
		else
			raise "No valid layer data pushed to method"
		end
		if !@output_pushed.nil? 
			ol = @layers.pop() 
			@layers.push(l) 
			@layers.push(ol) 
		else
			@layers.push(l)
		end	
	end
def pushHiddenLayer ( layer ) if layer . kind_of? ( NetworkLayer ) l = layer elsif layer . kind_of? ( Fixnum ) l = NetworkLayer . new ( layer ) else raise "No valid layer data pushed to method" end if ! @output_pushed . nil? ol = @layers . pop ( ) @layers . push ( l ) @layers . push ( ol ) else @layers . push ( l ) end end
Push hidden layers onto the stack.
Push hidden layers onto the stack .
# Output layer was pushed, insert before it # Pop the output layer # Push the new layer # Push the output layer
layer
<not_specific>