class_docstr: Model defined by a stack of layers in sequence.
class_docstr_tok: ["Model","defined","by","a","stack","of","layers","in","sequence","."]
code: def backward(self, d_y):
      # for layer in reversed(self.layers):
      for i in range(len(self.layers) - 1, -1, -1):
          with tf.name_scope(self.layers[i].name + "/backward"):
              grad_weights, d_y = self.layers[i].backward(d_y)
              self._optimizer.apply_gradients(
                  self.layers[i].weights, grad_weights
              )
  
file_path: tf-encrypted/tf_encrypted/keras/models/sequential.py
imports: import tensorflow
  import tf_encrypted
  from tf_encrypted.keras import optimizers
  from tf_encrypted.keras.engine import Layer
  from tf_encrypted.keras.engine.input_layer import Input
  from tf_encrypted.keras.engine.input_layer import InputLayer
  from .base_model import BaseModel
label_desc: Use image node_id 5 for calling the Sequential obj's underlying member method code with example usage: obj.backward(d_y) without return types