class_docstr: A simple linear regression model used for testing.
class_docstr_tok: ["A","simple","linear","regression","model","used","for","testing","."]
code: def finalize_minibatch(
      self,
      accumulated_minibatch_data: Dict[str, Any],
      device: Union[str, torch.device],
  ) -> Dict[str, Any]:
      return {
          "inputs": torch.tensor(
              np.stack(accumulated_minibatch_data["inputs"], axis=0),
              device=device,
          ),
          "targets": torch.tensor(
              np.stack(accumulated_minibatch_data["targets"], axis=0),
              device=device,
          ),
      }
  
imports: import numpy
  import torch
  from torch import nn
  from typing import Any, Dict, Iterator, NamedTuple, Optional, Union
  from ptgnn.baseneuralmodel import AbstractNeuralModel, ModuleWithMetrics
  from ptgnn.baseneuralmodel.utils.data import enforce_not_None
  from ptgnn.tests.simplemodel.data import SampleDatapoint
label_desc: Use image node_id 7 for calling the SimpleRegressionModel obj's underlying member method code with example usage: obj.finalize_minibatch(accumulated_minibatch_data, device) and returns: dict