class_docstr: ResNet model.
docstr: ResNet constructor.
  
  :param layers: a list of layers in CleverHans format
    each with set_input_shape() and fprop() methods.
  :param input_shape: 4-tuple describing input shape (e.g None, 32, 32, 3)
  :param scope: string name of scope for Variables
    This works in two ways.
    If scope is None, the variables are not put in a scope, and the
    model is compatible with Saver.restore from the public downloads
    for the CIFAR10 Challenge.
    If the scope is a string, then Saver.restore won't work, but the
    model functions as a picklable NoRefModels that finds its variables
    based on the scope.
docstr_tok: ["ResNet","constructor",".",":","param","layers",":","a","list","of","layers","in","CleverHans","format","each","with","set_input_shape","(",")","and","fprop","(",")","methods",".",":","param","input_shape",":","4-tuple","describing","input","shape","(","e.g","None",",","32",",","32",",","3",")",":","param","scope",":","string","name","of","scope","for","Variables","This","works","in","two","ways",".","If","scope","is","None",",","the","variables","are","not","put","in","a","scope",",","and","the","model","is","compatible","with","Saver.restore","from","the","public","downloads","for","the","CIFAR10","Challenge",".","If","the","scope","is","a","string",",","then","Saver.restore","wo","n't","work",",","but","the","model","functions","as","a","picklable","NoRefModels","that","finds","its","variables","based","on","the","scope","."]
code: def __init__(self, layers, input_shape, scope=None):
      """ResNet constructor.
  
      :param layers: a list of layers in CleverHans format
        each with set_input_shape() and fprop() methods.
      :param input_shape: 4-tuple describing input shape (e.g None, 32, 32, 3)
      :param scope: string name of scope for Variables
        This works in two ways.
        If scope is None, the variables are not put in a scope, and the
        model is compatible with Saver.restore from the public downloads
        for the CIFAR10 Challenge.
        If the scope is a string, then Saver.restore won't work, but the
        model functions as a picklable NoRefModels that finds its variables
        based on the scope.
      """
      super(ResNet, self).__init__(scope, 10, {}, scope is not None)
      if scope is None:
          before = list(tf.trainable_variables())
          before_vars = list(tf.global_variables())
          self.build(layers, input_shape)
          after = list(tf.trainable_variables())
          after_vars = list(tf.global_variables())
          self.params = [
              param for param in after if param not in before
          ]
          self.vars = [
              var for var in after_vars if var not in before_vars
          ]
      else:
          with tf.variable_scope(self.scope):
              self.build(layers, input_shape)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from cleverhans.serial import NoRefModel
label_desc: Use image node_id 1 to create a new ResNet object from inherited base classes: NoRefModel with example: obj = ResNet(layers, input_shape, scope)