code: def test_nnclassifier_fit_different_optimMethods(self):
      model = Sequential().add(Linear(2, 2))
      criterion = ClassNLLCriterion()
      classifier = (
          NNClassifier(model, criterion, SeqToTensor([2]))
          .setBatchSize(4)
          .setLearningRate(0.2)
          .setMaxEpoch(1)
      )
  
      df = self.get_classifier_df()
      for opt in [
          Adam(),
          SGD(
              learningrate=1e-2,
              learningrate_decay=1e-6,
          ),
          LBFGS(),
          Adagrad(),
          Adadelta(),
      ]:
          nnClassifierModel = classifier.setOptimMethod(opt).fit(df)
          res = nnClassifierModel.transform(df)
          res.collect()
          assert type(res).__name__ == "DataFrame"
  
imports: import errno
  import shutil
  import pytest
  from bigdl.dllib.nn.criterion import *
  from bigdl.dllib.nn.layer import *
  from bigdl.dllib.optim.optimizer import *
  from numpy.testing import assert_allclose
  from pyspark.ml import Pipeline, PipelineModel
  from pyspark.ml.feature import MinMaxScaler
  from pyspark.ml.tuning import ParamGridBuilder
  from pyspark.sql.types import *
  from bigdl.dllib.nncontext import *
  from bigdl.dllib.feature.common import *
  from bigdl.dllib.feature.image import *
  from bigdl.dllib.keras import layers
  from bigdl.dllib.keras.models import Model
  from bigdl.dllib.keras.optimizers import Adam
  from bigdl.dllib.nnframes import *
  from bigdl.dllib.utils.tf import *
  from pyspark.sql.functions import array
  from pyspark.ml.linalg import DenseVector, VectorUDT
  from pyspark.sql.functions import udf, array
label_desc: Use image node_id 29 for calling the TestNNClassifer obj's underlying member method code with example usage: obj.test_nnclassifier_fit_different_optimMethods() without return types