code: def test_nnclassifier_fit_with_Sigmoid(self):
      model = Sequential().add(Linear(2, 1)).add(Sigmoid())
      criterion = BCECriterion()
      classifier = (
          NNClassifier(model, criterion, SeqToTensor([2]))
          .setBatchSize(4)
          .setLearningRate(0.2)
          .setMaxEpoch(40)
      )
  
      data = self.sc.parallelize(
          [
              ((2.0, 1.0), 0.0),
              ((1.0, 2.0), 1.0),
              ((2.0, 1.0), 0.0),
              ((1.0, 2.0), 1.0),
          ]
      )
  
      schema = StructType(
          [
              StructField(
                  "features", ArrayType(DoubleType(), False), False
              ),
              StructField("label", DoubleType(), False),
          ]
      )
      df = self.sqlContext.createDataFrame(data, schema)
      nnClassifierModel = classifier.fit(df)
      assert isinstance(nnClassifierModel, NNClassifierModel)
      res = nnClassifierModel.transform(df)
      res.registerTempTable("nnClassifierModelDF")
      results = self.sqlContext.table("nnClassifierModelDF")
  
      count = results.rdd.count()
      data = results.rdd.collect()
  
      for i in range(count):
          row_label = data[i][1]
          row_prediction = data[i][2]
          assert row_label == row_prediction
  
imports: import errno
  import shutil
  import pytest
  from bigdl.nn.criterion import *
  from bigdl.nn.layer import *
  from bigdl.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 zoo.common.nncontext import *
  from zoo.feature.common import *
  from zoo.feature.image import *
  from zoo.pipeline.api.keras import layers
  from zoo.pipeline.api.keras.models import Model
  from zoo.pipeline.api.keras.optimizers import Adam
  from zoo.pipeline.nnframes import *
  from zoo.util.tf import *
label_desc: Use image node_id 27 for calling the TestNNClassifer obj's underlying member method code with example usage: obj.test_nnclassifier_fit_with_Sigmoid() without return types