Beispiel #1
0
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 );
}
Beispiel #2
0
TEST( testforward, comparespecific_break2 ) { // this breaks on v5.7.0 for example
    LayerDimensions dim;
    int batchSize = 4;
    int instance0 = 1;
    int instance1 = 5;
    int N = 4;
    bool debug = false;
    dim.setInputPlanes( 64 ).setInputSize(19).setNumFilters( 64 )
        .setFilterSize( 19 )
        .setPadZeros( false ).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::go();
    dim.deriveOthers();

    compareSpecific( debug, N, batchSize, dim, instance0, instance1 );    
}
Beispiel #3
0
TEST( SLOW_testforward, compare_args ) {
    LayerDimensions dim;
    int batchSize = 128;
    int instance0 = 1;
    int instance1 = 3;
    int N = 128;
    bool debug = false;
    dim.setInputPlanes( 64 ).setInputSize(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::go();
    dim.deriveOthers();

    compareSpecific( debug, N, batchSize, dim, instance0, instance1 );
}