class_docstr: ALSTM 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 : int
      the GPU ID used for training
class_docstr_tok: ["ALSTM","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",":","int","the","GPU","ID","used","for","training"]
code: def test_epoch(self, data_loader):
      self.ALSTM_model.eval()
  
      scores = []
      losses = []
  
      for data, weight in data_loader:
          feature = data[:, :, 0:-1].to(self.device)
          # feature[torch.isnan(feature)] = 0
          label = data[:, -1, -1].to(self.device)
  
          with torch.no_grad():
              pred = self.ALSTM_model(feature.float())
              loss = self.loss_fn(pred, label, weight.to(self.device))
              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 torch.utils.data import DataLoader
  from .pytorch_utils import count_parameters
  from ...model.base import Model
  from ...data.dataset import DatasetH
  from ...data.dataset.handler import DataHandlerLP
  from ...model.utils import ConcatDataset
  from ...data.dataset.weight import Reweighter
label_desc: Use image node_id 7 for calling the ALSTM obj's underlying member method code with example usage: obj.test_epoch(data_loader) and returns: np,  np