本文整理汇总了C++中LayerDimensions::setInputPlanes方法的典型用法代码示例。如果您正苦于以下问题:C++ LayerDimensions::setInputPlanes方法的具体用法?C++ LayerDimensions::setInputPlanes怎么用?C++ LayerDimensions::setInputPlanes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayerDimensions
的用法示例。
在下文中一共展示了LayerDimensions::setInputPlanes方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testPerf
TEST( SLOW_testforward, perf_kgsgo_fc500 ) {
int batchSize = 128;
LayerDimensions dim;
dim.setInputPlanes( 32 ).setInputSize(19).setNumFilters( 500 ).setFilterSize( 19 )
.setPadZeros( false ).setBiased( true );
testPerf( -1, 128, batchSize, dim );
}
示例2: testPerf
TEST( SLOW_testpropagate, perf_mnist_finallayer ) {
int batchSize = 128;
LayerDimensions dim;
dim.setInputPlanes( 32 ).setInputImageSize(28).setNumFilters( 10 ).setFilterSize( 28 )
.setPadZeros( false ).setBiased( true );
testPerf( -1, 128, batchSize, dim, new ReluActivation() );
}
示例3: compareSpecific
TEST( SLOW_testpropagate, compare_args ) {
LayerDimensions dim;
int batchSize = 128;
// int imageSize = 19;
// int filterSize = 7;
// int inputPlanes = 64;
// int numFilters = 64;
int instance0 = 1;
int instance1 = 3;
int N = 128;
bool debug = false;
string activationName = "tanh";
dim.setInputPlanes( 64 ).setInputImageSize(19).setNumFilters( 64 )
.setFilterSize( 7 )
.setPadZeros( true ).setBiased( false );
TestArgsParser::arg( "n", &N );
DimFromArgs::arg( &dim );
TestArgsParser::arg( "instance0", &instance0 );
TestArgsParser::arg( "instance1", &instance1 );
TestArgsParser::arg( "debug", &debug );
TestArgsParser::arg( "batchsize", &batchSize );
TestArgsParser::arg( "activation", &activationName );
TestArgsParser::go();
dim.deriveOthers();
ActivationFunction *fn = ActivationFunction::fromName( activationName );
compareSpecific( debug, N, batchSize, dim, fn, instance0, instance1 );
}
示例4: compareSpecific
TEST( testforward, compare_1_n_biased_pad ) {
EasyCL *cl = EasyCL::createForFirstGpuOtherwiseCpu();
int maxWorkgroupSize = cl->getMaxWorkgroupSize();
delete cl;
LayerDimensions dim;
int batchSize = 4;
int N = 4;
string activationName = "tanh";
dim.setInputPlanes( 8 ).setInputSize(19).setNumFilters( 8 )
.setFilterSize( 5 )
.setPadZeros( true ).setBiased( true );
for( int instance = 2; instance <= 7; instance++ ) {
if( instance == 5 ) {
continue; // forwardfc, cant use for inputimagesize != filtersize
}
dim.setInputSize(19);
if(instance == 2 && maxWorkgroupSize < 19 * 19) {
dim.setInputSize(15);
}
if(instance == 3 && maxWorkgroupSize < 19 * 19) {
dim.setInputSize(15);
}
cout << "instance: " << instance << endl;
compareSpecific( false, N, batchSize, dim, 1, instance );
}
}
示例5: measurePerf
TEST(SLOW_testbackward, perf_kgsgo_32c5) {
int batchSize = 128;
LayerDimensions dim;
dim.setInputPlanes(32).setInputSize(19).setNumFilters(32).setFilterSize(5)
.setPadZeros(true).setBiased(true);
cout << dim.buildOptionsString() << endl;
// ActivationFunction *fn = new ReluActivation();
measurePerf(2, batchSize, dim);
}
示例6: compareSpecific
TEST(SLOW_testbackward, compare_kgsgo_32c5mini) {
int batchSize = 4;
LayerDimensions dim;
dim.setInputPlanes(2).setInputSize(3).setNumFilters(2).setFilterSize(3)
.setPadZeros(true).setBiased(true);
cout << dim.buildOptionsString() << endl;
// ActivationFunction *fn = new ReluActivation();
compareSpecific(1, 2, 1, batchSize, dim);
}