Using the in-built MultilayerPerceptron Classifier of the ML package in Apache Spark without SoftMax as the output activation function -
as per documentation provided spark 2.1.0, train function of multilayer perceptron classifier in ml package has forcefully used softmax activation function on output layer (due convention). hidden layers meanwhile use sigmoid function.
for experimentation, use classifier in such way layers using sigmoid function only.
after digging further found an explanation on how these functions implemented inside classifier; according spark has forced softmax function inside train function using code : val topology = feedforwardtopology.multilayerperceptron(mylayers, softmaxontop = true)
.
now question is, how switch off softmaxontop parameter avoid using softmax on last layer. tried passing parameter, unsuccessful. using python implementation of spark.
any on 'using in-built multilayer perceptron classifier without softmax output function' highly appreciated.
Comments
Post a Comment