Initialize the base trainer
546062
def train(self, net_sizes, epochs, batchsize):
        
        self.trainer = ClassificationTrainer(self.data, self.targets, net_sizes)
        self.trainer.learn(epochs, batchsize)
        return self.trainer.evaluate(batchsize)
605526
def initialize(self, init_value, context=None, force=False):
        

        if not force and self._instance is not None:
            raise ConfigurationAlreadyInitializedError(
                'Configuration manager object is already initialized.'
            )

        self.__class__._instance = Root(init_value, context=context)
831629
def init(opts):
    '''
    
    '''
    if CONFIG_BASE_URL in opts['proxy']:
        CONFIG[CONFIG_BASE_URL] = opts['proxy'][CONFIG_BASE_URL]
    else:
        log.error('missing proxy property %s', CONFIG_BASE_URL)
    log.debug('CONFIG: %s', CONFIG)
1349558
void initialize() {
        // Cancel any running tasks
        Timer oldTimer = timer;
        timer = new Timer(true);
        if (Objects.nonNull(oldTimer)) {
            oldTimer.cancel();
        }
        // (re)initialize
        LoaderConfigurator configurator = new LoaderConfigurator(this);
        defaultLoaderServiceFacade = new DefaultLoaderServiceFacade(timer, listener, resources);
        configurator.load();
    }
203594
def initialize(self):
        
        print("Initializing '%s' weights..." % self.name, end=" ", file=sys.stderr)
        if self.sharedWeights:
            raise AttributeError("shared weights broken")
        self.count = 0
        for connection in self.connections:
            connection.initialize()
        for layer in self.layers:
            layer.initialize()
81319
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);
        $this->resolveId();
        if (isset($this->size)) {
            TbArray::defaultValue('size', $this->size, $this->htmlOptions);
        }
    }
583989
public void connect() {
        CommandFactory f = new CommandFactory();
        f.addTrainerInitCommand();
        initMessage = f.next();
        super.start();
        super.setName("Trainer");
    }
664973
def initialize():
    
    global __initialized

    if __initialized:
        return

    # Setup all the default base settings
    try:
        for data in DEFAULT_CONFIG_OPTIONS:
            nsobj = _get_config_namespace(data['prefix'], data['name'], sort_order=data['sort_order'])
            for opt in data['options']:
                _register_default_option(nsobj, opt)
            db.session.add(nsobj)

        # Iterate over all of our plugins and setup their defaults
        for ns, info in CINQ_PLUGINS.items():
            if info['name'] == 'commands':
                continue

            for entry_point in info['plugins']:
                _cls = entry_point.load()
                if hasattr(_cls, 'ns'):
                    ns_name = '{}: {}'.format(info['name'].capitalize(), _cls.name)
                    if not isinstance(_cls.options, abstractproperty):
                        nsobj = _get_config_namespace(_cls.ns, ns_name)
                        if _cls.options:
                            for opt in _cls.options:
                                _register_default_option(nsobj, opt)

                        db.session.add(nsobj)

        # Create the default roles if they are missing and import any missing or updated templates,
        # if they havent been modified by the user
        _add_default_roles()
        _import_templates()

        db.session.commit()
        dbconfig.reload_data()
        __initialized = True
    except ProgrammingError as ex:
        if str(ex).find('1146') != -1:
            logging.getLogger('cloud_inquisitor').error(
                'Missing required tables, please make sure you run `cloud-inquisitor db upgrade`'
            )
736882
def initialize():
    """"""
    try:
        requests.get('http://localhost:4242/poll')
        state['connected_to_bot'] = True
    except requests.exceptions.ConnectionError:
        state['connected_to_bot'] = False

    # set up turtle
    state['window'] = turtle.Screen()
    state['window'].setup(width=WCB_WIDTH, height=WCB_HEIGHT)
    state['turtle'] = turtle.Turtle()
    state['turtle'].width(5)
    point_in_direction(0)

    # set up watercolorbot brush
    brush_up()
    wash_brush()
    park()
1186406
protected static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$newDirectoryMode = \octdec((string)$baseClass->Filesystem->newDirectoryMode);
            static::$newFileMode = \octdec((string)$baseClass->Filesystem->newFileMode);
            static::$writeLocks = (boolean)$baseClass->Filesystem->writeLocks;
            static::$hashFileDir = $baseClass->parsePath((string)$baseClass->Filesystem->hashFileDirectory);
            static::$hashFileDirDepth = (int)$baseClass->Filesystem->hashFileDirectoryDepth;
            static::$documentRoot = $baseClass->parsePath('%DOCUMENT_ROOT%').DIRECTORY_SEPARATOR;
        }
    }
491681
public function init()
    {
        $this->db = \PHPDaemon\Clients\Mongo\Pool::getInstance($this->config->mongoclientname->value);
        $this->cache = \PHPDaemon\Clients\Memcache\Pool::getInstance($this->config->memcacheclientname->value);
        if (!isset($this->config->limitinstances)) {
            $this->log('missing \'limitInstances\' directive');
        }
    }
1199570
def _init_training(self):
        # pylint: disable=redefined-variable-type
        """"""
        if self.check:
            self.backprop = CheckedBackprop(self.network, self.problem.cost)
        else:
            self.backprop = BatchBackprop(self.network, self.problem.cost)
        self.momentum = Momentum()
        self.decent = GradientDecent()
        self.decay = WeightDecay()
        self.tying = WeightTying(*self.problem.weight_tying)
        self.weights = self.tying(self.weights)
1135905
private static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$revalidationTime = (int)$baseClass->Session->RevalidationTimeout;
        }
    }
181806
public void init(BaseField field, BaseField fldDest, BaseField fldSource)
    {
        super.init(field, fldDest, fldSource, false, false, false);
    }
33460
public function init()
    {
        if (!isset($this->basePath)) {
            $this->basePath = Yii::getPathOfAlias('webroot');
        }
        $this->basePath = rtrim($this->basePath, '/');
    }
6778
public function initialize() {
    $this->bltRoot = $this->getConfigValue('blt.root');
    $this->repoRoot = $this->getConfigValue('repo.root');
    $this->deployDir = $this->getConfigValue('deploy.dir');
    $this->formatter = new FormatterHelper();
  }
672605
public function init()
    {
        $this->basePath = __DIR__;
        AdminLteAsset::$skin = $this->skin;
        AdminLteAsset::$customSkin = $this->customSkin;

        if (!$this->pathMap) {
            $this->createPathMap();
        }
    }