nprnn.py
def evaluate_loss(input):
	'''
	Evaluates and returns loss on the input string (array of chars)
	'''
	oh = [np.zeros((1, HIDDEN_LAYER_SIZE)) for i in xrange(DEPTH)]
	loss = 0
	N = len(input) - 1
	for i in xrange(N):
		inpt = char_to_index[input[i]]
		target = char_to_index[input[i + 1]]
		prob, oh = forward(inpt, oh)
		target_prob = -np.log(prob[target]) / N
		loss += target_prob
	return loss

	Evaluates and returns loss on the input string (array of chars)
	
Evaluates and returns loss on the input string (array of chars)
Evaluates and returns loss on the input string ( array of chars )
def evaluate_loss(input):
	oh = [np.zeros((1, HIDDEN_LAYER_SIZE)) for i in xrange(DEPTH)]
	loss = 0
	N = len(input) - 1
	for i in xrange(N):
		inpt = char_to_index[input[i]]
		target = char_to_index[input[i + 1]]
		prob, oh = forward(inpt, oh)
		target_prob = -np.log(prob[target]) / N
		loss += target_prob
	return loss
def evaluate_loss ( input ) : oh = [ np . zeros ( ( 1 , HIDDEN_LAYER_SIZE ) ) for i in xrange ( DEPTH ) ] loss = 0 N = len ( input ) - 1 for i in xrange ( N ) : inpt = char_to_index [ input [ i ] ] target = char_to_index [ input [ i + 1 ] ] prob , oh = forward ( inpt , oh ) target_prob = - np . log ( prob [ target ] ) / N loss += target_prob return loss
Evaluates and returns loss on the input string (array of chars)
Evaluates and returns loss on the input string ( array of chars )
'''
	Evaluates and returns loss on the input string (array of chars)
	'''
input