(ninputs=9600, nclass=5)
return lrmodel, opt, cost
Set up and compile the model architecture (Logistic regression)
Set up and compile the model architecture (Logistic regression)
Set up and compile the model architecture ( Logistic regression )
def prepare_model(ninputs=9600, nclass=5):
    """
    Set up and compile the model architecture (Logistic regression)
    """
    layers = [Affine(nout=nclass, init=Gaussian(loc=0.0, scale=0.01), activation=Softmax())]

    cost = GeneralizedCost(costfunc=CrossEntropyMulti())
    opt = Adam()
    lrmodel = Model(layers=layers)

    return lrmodel, opt, cost
def prepare_model ( ninputs = 9600 , nclass = 5 ) : layers = [ Affine ( nout = nclass , init = Gaussian ( loc = 0.0 , scale = 0.01 ) , activation = Softmax ( ) ) ] cost = GeneralizedCost ( costfunc = CrossEntropyMulti ( ) ) opt = Adam ( ) lrmodel = Model ( layers = layers ) return lrmodel , opt , cost