mirror of https://github.com/davisking/dlib.git
Changed this example to use repeat layers. This doesn't change the behavior of
the code, but it helps visual studio use less RAM when building the example, and might make appveyor not crash. It's also a slightly cleaner way to write the code anyway.
This commit is contained in:
parent
83a4af4622
commit
603ebc2750
|
@ -145,25 +145,35 @@ template <int N, typename SUBNET> using ares_up = dlib::relu<residual_up<block
|
|||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
template <typename SUBNET> using level1 = res<512,res<512,res_down<512,SUBNET>>>;
|
||||
template <typename SUBNET> using level2 = res<256,res<256,res_down<256,SUBNET>>>;
|
||||
template <typename SUBNET> using level3 = res<128,res<128,res_down<128,SUBNET>>>;
|
||||
template <typename SUBNET> using level4 = res<64,res<64,res<64,SUBNET>>>;
|
||||
template <typename SUBNET> using res512 = res<512, SUBNET>;
|
||||
template <typename SUBNET> using res256 = res<256, SUBNET>;
|
||||
template <typename SUBNET> using res128 = res<128, SUBNET>;
|
||||
template <typename SUBNET> using res64 = res<64, SUBNET>;
|
||||
template <typename SUBNET> using ares512 = ares<512, SUBNET>;
|
||||
template <typename SUBNET> using ares256 = ares<256, SUBNET>;
|
||||
template <typename SUBNET> using ares128 = ares<128, SUBNET>;
|
||||
template <typename SUBNET> using ares64 = ares<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_down<256,SUBNET>>>;
|
||||
template <typename SUBNET> using alevel3 = ares<128,ares<128,ares_down<128,SUBNET>>>;
|
||||
template <typename SUBNET> using alevel4 = ares<64,ares<64,ares<64,SUBNET>>>;
|
||||
|
||||
template <typename SUBNET> using level1t = res<512,res<512,res_up<512,SUBNET>>>;
|
||||
template <typename SUBNET> using level2t = res<256,res<256,res_up<256,SUBNET>>>;
|
||||
template <typename SUBNET> using level3t = res<128,res<128,res_up<128,SUBNET>>>;
|
||||
template <typename SUBNET> using level4t = res<64,res<64,res_up<64,SUBNET>>>;
|
||||
template <typename SUBNET> using level1 = dlib::repeat<2,res512,res_down<512,SUBNET>>;
|
||||
template <typename SUBNET> using level2 = dlib::repeat<2,res256,res_down<256,SUBNET>>;
|
||||
template <typename SUBNET> using level3 = dlib::repeat<2,res128,res_down<128,SUBNET>>;
|
||||
template <typename SUBNET> using level4 = dlib::repeat<2,res64,res<64,SUBNET>>;
|
||||
|
||||
template <typename SUBNET> using alevel1t = ares<512,ares<512,ares_up<512,SUBNET>>>;
|
||||
template <typename SUBNET> using alevel2t = ares<256,ares<256,ares_up<256,SUBNET>>>;
|
||||
template <typename SUBNET> using alevel3t = ares<128,ares<128,ares_up<128,SUBNET>>>;
|
||||
template <typename SUBNET> using alevel4t = ares<64,ares<64,ares_up<64,SUBNET>>>;
|
||||
template <typename SUBNET> using alevel1 = dlib::repeat<2,ares512,ares_down<512,SUBNET>>;
|
||||
template <typename SUBNET> using alevel2 = dlib::repeat<2,ares256,ares_down<256,SUBNET>>;
|
||||
template <typename SUBNET> using alevel3 = dlib::repeat<2,ares128,ares_down<128,SUBNET>>;
|
||||
template <typename SUBNET> using alevel4 = dlib::repeat<2,ares64,ares<64,SUBNET>>;
|
||||
|
||||
template <typename SUBNET> using level1t = dlib::repeat<2,res512,res_up<512,SUBNET>>;
|
||||
template <typename SUBNET> using level2t = dlib::repeat<2,res256,res_up<256,SUBNET>>;
|
||||
template <typename SUBNET> using level3t = dlib::repeat<2,res128,res_up<128,SUBNET>>;
|
||||
template <typename SUBNET> using level4t = dlib::repeat<2,res64,res_up<64,SUBNET>>;
|
||||
|
||||
template <typename SUBNET> using alevel1t = dlib::repeat<2,ares512,ares_up<512,SUBNET>>;
|
||||
template <typename SUBNET> using alevel2t = dlib::repeat<2,ares256,ares_up<256,SUBNET>>;
|
||||
template <typename SUBNET> using alevel3t = dlib::repeat<2,ares128,ares_up<128,SUBNET>>;
|
||||
template <typename SUBNET> using alevel4t = dlib::repeat<2,ares64,ares_up<64,SUBNET>>;
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue