code: def __init__(self, model, params, input_names):
      self.model = model
      self.params = params
      self.input_names = input_names
      self.model.dropout_rate = 0
      self.model.rnn.dropout = 0
      self.model.train()
  
imports: import torch
  import torch.nn
  import torch.optim
  from tqdm.auto import tqdm
  from typing import List
  from sparse_layer import SparseNet
label_desc: Use image node_id 1 to create a new SparseLayerAttack object  with example: obj = SparseLayerAttack(model, params, input_names)