Do you know how to calculate the window size for "CreateDeformation" layer in Caffe with unet patch?

20 views
Skip to first unread message

Shima Masoumi

unread,
Sep 6, 2018, 1:12:15 AM9/6/18
to Caffe Users
Dear Caffe experts,

I have a question which I am hoping I get a response for my question here,

I have trained the 3D-unetwith the default settings for the window size (tile) is `nz: 116 ny: 132 nx: 132`  in `CreateDeformation` layer as follows:

layer { type: 'CreateDeformation'

 bottom
: 'label' # to compare labels with ignore label
 

 top
: 'def'
 

 name
: 'create_deformation'
 

 create_deformation_param
{
 

 random_offset_range_from_ignore_label
: 255
 

 batch_size
: 1 nz: 116 ny: 132 nx: 132 ncomponents: 3
 

 random_elastic_grid_spacing
{ v: 32 v: 32 v: 32 }
 

 random_elastic_deform_magnitude
{ v: 4 v: 4 v: 4 }
 

 random_rotate_from
{ v: -5 v: -5 v: -5 }
 

 random_rotate_to
{ v: 5 v: 5 v: 5 }
 

 
}
 
 include
: { phase: TRAIN } }


I need to increase the size of window in x and y direction, However, once I change the window size to `nz:64 ny:148 nx: 148`, caffe is raising an error related to `Concat` layer:

I0904 16:58:19.558616 29073 net.cpp:426] concat_d1c_u1a-b <- scaleu1a
I0904
16:58:19.558620 29073 net.cpp:426] concat_d1c_u1a-b <- scaled1c_relu_d1c_0_split_1
I0904
16:58:19.558627 29073 net.cpp:400] concat_d1c_u1a-b -> u1b
F0904
16:58:19.558653 29073 concat_layer.cpp:70] Check failed: borderwidth*2 == width_difference (30 vs. 31) width difference must be even! input blob 1 axis 2 has width 35 and output blob has width 4. The difference 31 is not even.
*** Check failure stack trace: ***
   
@     0x7f724d7825cd  google::LogMessage::Fail()
   
@     0x7f724d784433  google::LogMessage::SendToLog()
   
@     0x7f724d78215b  google::LogMessage::Flush()
   
@     0x7f724d784e1e  google::LogMessageFatal::~LogMessageFatal()
   
@     0x7f724de7968c  caffe::ConcatLayer<>::Reshape()
   
@     0x7f724ddb485f  caffe::Net<>::Init()
   
@     0x7f724ddb60e1  caffe::Net<>::Net()
   
@     0x7f724ddbf3da  caffe::Solver<>::InitTrainNet()
   
@     0x7f724ddc0747  caffe::Solver<>::Init()
   
@     0x7f724ddc0aea  caffe::Solver<>::Solver()
   
@     0x7f724df7d1d3  caffe::Creator_SGDSolver<>()
   
@           0x40a5d8  train()
   
@           0x4074b8  main
   
@     0x7f724c43a830  __libc_start_main
   
@           0x407c19  _start
   
@              (nil)  (unknown)

Is there any formulation for calculating the size for window in CreateDeformation layer?
I need to increase the size tile for my data to be able to see bigerview of the data. 
Your help is really appreciated. 

Thank you
Reply all
Reply to author
Forward
0 new messages