def create(self): return optimizers.MSVAG(0.1)
elif args.adam: optimizer = optimizers.Adam() elif args.sgd: optimizer = optimizers.SGD() elif args.adagrad: optimizer = optimizers.AdaGrad() elif args.amsgrad: optimizer = optimizers.AMSGrad() elif args.amsbound: optimizer = optimizers.AMSBound() elif args.correctedmomentsgd: optimizer = optimizers.CorrectedMomentumSGD() elif args.nesterovag: optimizer = optimizers.NesterovAG() elif args.msvag: optimizer = optimizers.MSVAG() elif args.rmspropgraves: optimizer = optimizers.RMSpropGraves() elif args.smorms3: optimizer = optimizers.SMORMS3() else: optimizer = optimizers.AdaDelta() optimizer.setup(net) if args.lasso: #Lasso回帰でスパース化 from chainer.optimizer_hooks import Lasso for param in net.params(): if param.name != 'b': param.update_rule.add_hook(Lasso(decay))