-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Error Training FCN model on a more simplified network structure #1789
Comments
I had defined my Offset as follows def offset(): |
@Viswa14 sorry for late replay, you may use pdb to debug the return value of offset(), and make sure it is corretly for your symbol. on the other hand, i think your symbol define maybe wrong for the deconvotion kernel/stride paramter in fcnxs_score, be careful to check the kernel/stride for your use. |
@tornadomeet : How do we decide deconvolution stride or kernel ? and does Deconvolution operation by default use upsampling in Mxnet ? According to Issues #1514 @piiswrong says 2X upsampling can directly be done through using kernel = (4,4) and stride = (2,2) , is that true ? I am looking forward to construct a very simple Convolution - Pooling (downsample by two) -> Convolution - Pooling (Downsample by two) -> Special convolutions (similar to fc6 , fc7 in fcnxs to represent fully connected layer) -> Deconv (upsample by 2) -> Deconv (upsample by 2) -> SoftmaxOutput (Segmentation) ? and I am not sure how to do unpooling or upsampling for deconvolution layer ? Can you just chime in your ideas ? |
kernel = (4,4) and stride = (2,2), pad=(1,1) can be one triple parameter used for upsampling 2X, of course, your can use other triple combination, the formula can refer to it's output shape of deconv operator:https://github.com/dmlc/mxnet/blob/master/src/operator/deconvolution-inl.h#L327-L330 |
When Upsampling can be enforced using deconv operator, why do we use a separate upsample_filt method in init_fcnxs.py for deconv parameters? https://github.com/dmlc/mxnet/blob/master/example/fcn-xs/init_fcnxs.py#L40-L42 |
use bilinear interpolation for deconv init |
@tornadomeet @piiswrong I try to train FCN model in a somewhat more simplified way, For Example : for FCN 32 model I try to omit group4 or vgg16_pool4() method:
In code:
def fcnxs32_symbol():
{
data = mx.symbol.Variable(name="data")
pool3 = vgg16_pool3(data, workspace_default)
score = vgg16_score(pool3, numclass, workspace_default)
softmax = fcnxs_score(score, data, offset()["fcn32s_upscore"], (4,4), (1,1), numclass, workspace_default)
return softmax
}
I get an Error as
/mxnet/dmlc-core/include/dmlc/logging.h:241: [19:07:56] src/operator/./crop-inl.h:103: Check failed: (data_shape[2]) >= (out_shape[2]) data_shape'height should be larger than that of out_shape
Note: From my understanding I find the error occurs due to the following calculation
upscore = mx.symbol.Crop(*[bigscore, crop], offset=offset, name="upscore")
and I tried several values for offset even (0,0) but still get the same error. I want my Kernel Size to be so small as I am dealing with micro size objects. Appreciate your kind help in figuring out what Am I missing here?
The text was updated successfully, but these errors were encountered: