code: def on_epoch_end(self, net, **kwargs):
      seed_sentence = "the meaning of"
      indices = [
          corpus.dictionary.word2idx[n] for n in seed_sentence.split()
      ]
      indices = skorch.utils.to_tensor(
          torch.LongTensor([indices]).t(), device=device
      )
      sentence, _ = net.sample_n(num_words=10, input=indices)
      print(
          seed_sentence,
          " ".join([corpus.dictionary.idx2word[n] for n in sentence]),
      )
  
file_path: skorch/examples/word_language_model/train.py
imports: import argparse
  import skorch
  import torch
  from sklearn.model_selection import GridSearchCV
  import data
  from model import RNNModel
  from net import Net
label_desc: Use image node_id 1 for calling the ExamplePrinter obj's underlying member method code with example usage: obj.on_epoch_end(net) without return types