class_docstr: PreResNet model from 'Identity Mappings in Deep Residual Networks,' https://arxiv.org/abs/1603.05027.
  
  Parameters:
  ----------
  channels : list of list of int
      Number of output channels for each unit.
  init_block_channels : int
      Number of output channels for the initial unit.
  bottleneck : bool
      Whether to use a bottleneck or simple block in units.
  conv1_stride : bool
      Whether to use stride in the first or the second convolution layer in units.
  in_channels : int, default 3
      Number of input channels.
  num_classes : int, default 1000
      Number of classification classes.
class_docstr_tok: ["PreResNet","model","from","'Identity","Mappings","in","Deep","Residual","Networks",",","'","https",":","\/\/arxiv.org\/abs\/1603.05027",".","Parameters",":","--","--","--","--","--","channels",":","list","of","list","of","int","Number","of","output","channels","for","each","unit",".","init_block_channels",":","int","Number","of","output","channels","for","the","initial","unit",".","bottleneck",":","bool","Whether","to","use","a","bottleneck","or","simple","block","in","units",".","conv1_stride",":","bool","Whether","to","use","stride","in","the","first","or","the","second","convolution","layer","in","units",".","in_channels",":","int",",","default","3","Number","of","input","channels",".","num_classes",":","int",",","default","1000","Number","of","classification","classes","."]
code: def __init__(
      self,
      channels,
      init_block_channels,
      bottleneck,
      conv1_stride,
      in_channels=3,
      num_classes=1000,
  ):
      super(PreResNet, self).__init__()
  
      self.features = nn.Sequential()
      self.features.add_module(
          "init_block",
          PreResInitBlock(
              in_channels=in_channels, out_channels=init_block_channels
          ),
      )
      in_channels = init_block_channels
      for i, channels_per_stage in enumerate(channels):
          stage = nn.Sequential()
          for j, out_channels in enumerate(channels_per_stage):
              stride = 1 if (i == 0) or (j != 0) else 2
              stage.add_module(
                  "unit{}".format(j + 1),
                  PreResUnit(
                      in_channels=in_channels,
                      out_channels=out_channels,
                      stride=stride,
                      bottleneck=bottleneck,
                      conv1_stride=conv1_stride,
                  ),
              )
              in_channels = out_channels
          self.features.add_module("stage{}".format(i + 1), stage)
      self.features.add_module(
          "post_activ", PreResActivation(in_channels=in_channels)
      )
      self.features.add_module(
          "final_pool", nn.AvgPool2d(kernel_size=7, stride=1)
      )
  
      self.output = nn.Linear(
          in_features=in_channels, out_features=num_classes
      )
  
      self._init_params()
  
imports: import numpy
  import torch
  from torch.autograd import Variable
  from pytorch2keras.converter import pytorch_to_keras
  import os
  import torch.nn
  import torch.nn.init
label_desc: Use image node_id 1 to create a new PreResNet object from inherited base classes: nn with example: obj = PreResNet(channels, init_block_channels, bottleneck, conv1_stride, in_channels, num_classes)