code: func (t *Trainer) train(epochs int) error {
  
  	var epochChan chan struct{}
  	if t.cost != nil {
  		defer func() {
  			close(t.cost)
  			t.cost = nil
  		}()
  
  		epochChan = t.handleCosts()
  		if epochChan != nil {
  			defer close(epochChan)
  		}
  	}
  
  	examples := makeExamples(t.trainingSet, t.nn.NNConfig, t.nn.dict, t.ts, t)
  
  	for e := 0; e < epochs; e++ {
  		if err := t.nn.train(examples); err != nil {
  			return err
  		}
  
  		if epochChan != nil {
  			epochChan <- struct{}{}
  		}
  
  		shuffleExamples(examples)
  	}
  	return nil
  }
docs: // train simply trains the model without having a cross validation.