Katzlab dd76ab1d12 Added PTL2 Scripts
These are PTL2 files from Auden 2/9
2023-02-14 11:20:52 -05:00

27 lines
575 B
C++

#include "WeightUpdate.h" //change
#include "WeightUpdateStrategy.h" //change
#include <cassert> //change
tWeightUpdate*
WeightUpdateStrategy_cl::NewWeights( Weights_cl OrigWeights ) const
{
tWeightUpdate* W;
switch( iType )
{
case None:
case Random:
case Prior:
W = new tWeightUpdateRandom( OrigWeights );
break;
case Adversarial:
W = new tWeightUpdateGradient( OrigWeights );
break;
default:
assert(false);
}
W->SetTemperature( iStart/iCool );
if( iType == None || iType == Prior )
W->SetTemperature( 0.0 );
return W;
}