-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Subpixel convolution(state of art) implementation rather than using Deconvolution. #7717
Comments
As far as I know, mxnet does not support subpixel upsampling layer yet. Still, you can emulate it using a series of transpose and reshape layers. I am currently using the followings, messy but works anyway. def subpixel_upsample(data, ch, c, r, name=None):
'''
Transform input data shape of (n, ch*r*c, h, w) to (n, ch, h*r, c*w).
ch: number of channels after upsample
r: row scale factor
c: column scale factor
'''
if r == 1 and c == 1:
return data
X = mx.sym.reshape(data=data, shape=(-3, 0, 0)) # (n*ch*r*c, h, w)
X = mx.sym.reshape(data=X, shape=(-4, -1, r * c, 0, 0)) # (n*ch, r*c, h, w)
X = mx.sym.transpose(data=X, axes=(0, 3, 2, 1)) # (n*ch, w, h, r*c)
X = mx.sym.reshape(data=X, shape=(0, 0, -1, c)) # (n*ch, w, h*r, c)
X = mx.sym.transpose(data=X, axes=(0, 2, 1, 3)) # (n*ch, h*r, w, c)
X = mx.sym.reshape(data=X, name=name, shape=(-4, -1, ch, 0, -3)) # (n, ch, h*r, w*c)
return X |
Thanks eldercrow. Yeah it is the same sub-pixel convolutions...Thanks for suggestions |
Hai Eldercrow, ihave incorporated your suggestions for sub-pixel dense upsampling operation rather than deconvolution. |
@eldercrow , kindly suggest for this dense upsampling operation. My i/p is 1024x48x64 Hence i did conv to produce (191616)4864. Here upsampling factor is 16, num_classes=19 |
Seems that the error is from a concat layer, but the function above has no concat layer. I guess you did something wrong in cropping your feature map. |
iam not using any concat layer, below is the code along with jupyter notebook producing dimensions. croped_score = mx.symbol.Crop(*[featmap_score, data], offset=(8, 8), name='croped_score') #(1,19,768,1024)
|
Sorry, I was meaning crop not concat. I suggest you to check the feature dim after crop layer. |
Thanks for your reply .. |
From your error message, it seems that cropping is unnecessary since data_shape[3] - out_shape[3] is 0.
|
Dear Eldercrow, I tried according to you and i removed crop function as you suggested. After that module started training. Even after several epochs training log loss measure remains same after several epochs. Below is report Epoch[0] Batch [730] Speed: 3.843 samples/sec Train-FCNLogLoss= 2.944441. Kindly suggest how to go ahead and solve this issue |
Dear Eldercrow,
I tried according to you and i removed crop function as you suggested.
After that module started training. Even after several epochs training log
loss measure remains same after several epochs.
Below is report
Epoch[0] Batch [10] Speed: 3.88 samples/sec Train-FCNLogLoss= 2.944441
.............................................
Epoch[0] Batch [730] Speed: 3.843 samples/sec Train-FCNLogLoss= 2.944441.
Kindly suggest how to go ahead and solve this issue
…On 16 September 2017 at 08:38, eldercrow ***@***.***> wrote:
From your error message, it seems that cropping is unnecessary since
data_shape[3] - out_shape[3] is 0.
src/operator/./crop-inl.h:139: Check failed: param_.offset[1] <= data_shape[3]-out_shape[3] (8 vs. 0) offset[1] should be less than the residual space of width
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#7717 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AeIabTFBaVXZGQyucnecWh-G0Nt-8NPrks5sizuugaJpZM4PLPjX>
.
|
@apache/mxnet-committers: This issue has been inactive for the past 90 days. It has no label and needs triage. For general "how-to" questions, our user forum (and Chinese version) is a good place to get help. |
Recommended Labels: "Question", "Discussion" |
@chowkamlee81 are you still working on that? If not please consider closing. You can have a look at the GluonCV FCN implementation as a reference: @sandeep-krishnamurthy can you add "Pending Requester Info" tag? And remove the Example tag |
@chowkamlee81 could you please close the issue if it has been fixed? Thanks |
Is there is any mxnet implementation of subpixel CNN rather than using Deconvolution which is the state of art according to Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network.
There could be any developement from amazon mxnet framework?
The text was updated successfully, but these errors were encountered: