コード例 #1
0
ファイル: TNeyron.cpp プロジェクト: IvanPetroff/home
__fastcall TNeyron::TNeyron(TIniFile* F, AnsiString SectionName, vector<TNeyron*> &Layer)
{
    int cnt_inputs = F->ReadInteger( SectionName, "SYNAPSES", 0);
    w.resize(cnt_inputs);
    s.resize(cnt_inputs);
    sn.resize(cnt_inputs);
    LoadWeights(F, SectionName);
    LoadSynapses(F, SectionName, Layer);
}
コード例 #2
0
void LogLinearModel::Init (String _sName)
{
	d_LearningRate = (config)(_sName + ":learning_rate");
	d_RegularizationFactor = (config)(_sName + ":regularization_factor");
	if (1 == (int)(config)(_sName + ":load_weights"))
		LoadWeights (_sName);
	else if (true == Path::Exists ((config)(_sName + ":weights_file")))
		Path::RemoveFile ((config)(_sName + ":weights_file"));
	d_MaxWeightCeiling = (config)(_sName + ":max_weight_ceiling");

	cout << "Initializing log-linear model (" << _sName << ')' << endl;
	cout << "   Learning rate  : " << d_LearningRate << endl;
	cout << "   Regularization : " << d_RegularizationFactor << endl;
}