Evgeniy Fominov's changes that avoid compiler bugs in Visual Studio.

This commit is contained in:
Davis King 2016-10-08 14:27:34 -04:00
parent c22b94c93f
commit d4958e8a8e
2 changed files with 29 additions and 15 deletions

View File

@ -47,15 +47,19 @@ using block = BN<con<N,3,3,1,1,relu<BN<con<N,3,3,stride,stride,SUBNET>>>>>;
template <int N, typename SUBNET> using ares = relu<residual<block,N,affine,SUBNET>>; template <int N, typename SUBNET> using ares = relu<residual<block,N,affine,SUBNET>>;
template <int N, typename SUBNET> using ares_down = relu<residual_down<block,N,affine,SUBNET>>; template <int N, typename SUBNET> using ares_down = relu<residual_down<block,N,affine,SUBNET>>;
template <typename SUBNET> using level1 = ares<512,ares<512,ares_down<512,SUBNET>>>;
template <typename SUBNET> using level2 = ares<256,ares<256,ares<256,ares<256,ares<256,ares_down<256,SUBNET>>>>>>;
template <typename SUBNET> using level3 = ares<128,ares<128,ares<128,ares_down<128,SUBNET>>>>;
template <typename SUBNET> using level4 = ares<64,ares<64,ares<64,SUBNET>>>;
using anet_type = loss_multiclass_log<fc<1000,avg_pool_everything< using anet_type = loss_multiclass_log<fc<1000,avg_pool_everything<
ares<512,ares<512,ares_down<512, level1<
ares<256,ares<256,ares<256,ares<256,ares<256,ares_down<256, level2<
ares<128,ares<128,ares<128,ares_down<128, level3<
ares<64,ares<64,ares<64, level4<
max_pool<3,3,2,2,relu<affine<con<64,7,7,2,2, max_pool<3,3,2,2,relu<affine<con<64,7,7,2,2,
input_rgb_image_sized<227> input_rgb_image_sized<227>
>>>>>>>>>>>>>>>>>>>>>>>; >>>>>>>>>>>;
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------

View File

@ -40,25 +40,35 @@ template <int N, typename SUBNET> using ares_down = relu<residual_down<block,N,a
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
template <typename SUBNET> using level1 = res<512,res<512,res_down<512,SUBNET>>>;
template <typename SUBNET> using level2 = res<256,res<256,res<256,res<256,res<256,res_down<256,SUBNET>>>>>>;
template <typename SUBNET> using level3 = res<128,res<128,res<128,res_down<128,SUBNET>>>>;
template <typename SUBNET> using level4 = res<64,res<64,res<64,SUBNET>>>;
template <typename SUBNET> using alevel1 = ares<512,ares<512,ares_down<512,SUBNET>>>;
template <typename SUBNET> using alevel2 = ares<256,ares<256,ares<256,ares<256,ares<256,ares_down<256,SUBNET>>>>>>;
template <typename SUBNET> using alevel3 = ares<128,ares<128,ares<128,ares_down<128,SUBNET>>>>;
template <typename SUBNET> using alevel4 = ares<64,ares<64,ares<64,SUBNET>>>;
// training network type // training network type
using net_type = loss_multiclass_log<fc<1000,avg_pool_everything< using net_type = loss_multiclass_log<fc<1000,avg_pool_everything<
res<512,res<512,res_down<512, level1<
res<256,res<256,res<256,res<256,res<256,res_down<256, level2<
res<128,res<128,res<128,res_down<128, level3<
res<64,res<64,res<64, level4<
max_pool<3,3,2,2,relu<bn_con<con<64,7,7,2,2, max_pool<3,3,2,2,relu<bn_con<con<64,7,7,2,2,
input_rgb_image_sized<227> input_rgb_image_sized<227>
>>>>>>>>>>>>>>>>>>>>>>>; >>>>>>>>>>>;
// testing network type (replaced batch normalization with fixed affine transforms) // testing network type (replaced batch normalization with fixed affine transforms)
using anet_type = loss_multiclass_log<fc<1000,avg_pool_everything< using anet_type = loss_multiclass_log<fc<1000,avg_pool_everything<
ares<512,ares<512,ares_down<512, alevel1<
ares<256,ares<256,ares<256,ares<256,ares<256,ares_down<256, alevel2<
ares<128,ares<128,ares<128,ares_down<128, alevel3<
ares<64,ares<64,ares<64, alevel4<
max_pool<3,3,2,2,relu<affine<con<64,7,7,2,2, max_pool<3,3,2,2,relu<affine<con<64,7,7,2,2,
input_rgb_image_sized<227> input_rgb_image_sized<227>
>>>>>>>>>>>>>>>>>>>>>>>; >>>>>>>>>>>;
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------