Training loop
            words = torch.from_numpy(word_file.root.data[start:start+batch_size, :].astype(int))
	        entities = torch.from_numpy(entity_file.root.data[start:start+batch_size, :].astype(int))
			optimizer.zero_grad()
			words.cuda()
			entities.cuda()

			loss = model(words, entities)	
			loss.backward(retain_graph=False)
			optimizer.step()
			
			del loss
			del words
			del entities
			torch.cuda.empty_cache()	
            batchno = batchno + 1
			start = start + batch_size