code: def __init__(self, layers, loss=None):
      # At init, we define our layers
      super(MultiLayerPerceptron, self).__init__()
      self.layers = layers
      if loss is None:
          self.loss = torch.nn.MSELoss(reduction="none")
      else:
          self.loss = loss
      self.optimizer = torch.optim.SGD(self.parameters(), lr=0.001)
  
file_path: tslearn/docs/examples/autodiff/plot_soft_dtw_loss_for_pytorch_nn.py
imports: import numpy
  import matplotlib.pyplot
  from tslearn.datasets import CachedDatasets
  from tslearn.metrics import SoftDTWLossPyTorch
  import torch
  from torch import nn
label_desc: Use image node_id 1 to create a new MultiLayerPerceptron object from inherited base classes: torch.nn with example: obj = MultiLayerPerceptron(layers, loss)