class_docstr: KRNN Model
  
  Parameters
  ----------
  d_feat : int
      input dimension for each time step
  metric: str
      the evaluation metric used in early stop
  optimizer : str
      optimizer name
  GPU : str
      the GPU ID(s) used for training
code: def test_epoch(self, data_x, data_y):
      # prepare training data
      x_values = data_x.values
      y_values = np.squeeze(data_y.values)
  
      self.krnn_model.eval()
  
      scores = []
      losses = []
  
      indices = np.arange(len(x_values))
  
      for i in range(len(indices))[:: self.batch_size]:
          if len(indices) - i < self.batch_size:
              break
  
          feature = (
              torch.from_numpy(
                  x_values[indices[i : i + self.batch_size]]
              )
              .float()
              .to(self.device)
          )
          label = (
              torch.from_numpy(
                  y_values[indices[i : i + self.batch_size]]
              )
              .float()
              .to(self.device)
          )
  
          pred = self.krnn_model(feature)
          loss = self.loss_fn(pred, label)
          losses.append(loss.item())
  
          score = self.metric_fn(pred, label)
          scores.append(score.item())
  
      return np.mean(losses), np.mean(scores)
  
imports: from __future__ import division
  from __future__ import print_function
  import numpy
  import pandas
  from typing import Text, Union
  import copy
  from ...utils import get_or_create_path
  from ...log import get_module_logger
  import torch
  import torch.nn
  import torch.optim
  from ...model.base import Model
  from ...data.dataset import DatasetH
  from ...data.dataset.handler import DataHandlerLP
label_desc: Use image node_id 8 for calling the KRNN obj's underlying member method code with example usage: obj.test_epoch(data_x, data_y) and returns: np,  np