shepnerd / inpainting_gmcnn

Image Inpainting via Generative Multi-column Convolutional Neural Networks, NeurIPS2018
MIT License
428 stars 98 forks source link

Question on the order of parameters #4

Closed hi-zhengcheng closed 5 years ago

hi-zhengcheng commented 5 years ago

@shepnerd Thanks for your well written code. my question is about the order of parameters of the following function:

https://github.com/shepnerd/inpainting_gmcnn/blob/fe5295ea8029e59a9cd3ae5547463cf188450229/tensorflow/net/ops.py#L472

From the place this function is invoked: https://github.com/shepnerd/inpainting_gmcnn/blob/fe5295ea8029e59a9cd3ae5547463cf188450229/tensorflow/net/ops.py#L507 and https://github.com/shepnerd/inpainting_gmcnn/blob/fe5295ea8029e59a9cd3ae5547463cf188450229/tensorflow/net/ops.py#L511

I can figure out:

  1. feat_A is the feature computed from predicted data
  2. feat_B is the feature computed from ground truth data

Then this function invokes mrf_loss:

mrf_loss(feat_A, feat_B, distance=config.Dist, nnsigma=config.nn_stretch_sigma)

In the definition of mrf_loss function: https://github.com/shepnerd/inpainting_gmcnn/blob/fe5295ea8029e59a9cd3ae5547463cf188450229/tensorflow/net/ops.py#L409

I can figure out:

  1. T_features should be feature computed from ground truth data
  2. I_features should be feature computed from predicted data

So the order of parameters is not right? May be I misunderstand something. Could you help me check this?

shepnerd commented 5 years ago

The order of the given parameters is correct. You can check the implementation create_using_dotP (L301 in ops.py).

hi-zhengcheng notifications@github.com 于2019年3月23日周六 上午9:49写道:

@shepnerd https://github.com/shepnerd Thanks for your well written code. my question is about the order of parameters of the following function:

https://github.com/shepnerd/inpainting_gmcnn/blob/fe5295ea8029e59a9cd3ae5547463cf188450229/tensorflow/net/ops.py#L472

From the place this function is invoked:

https://github.com/shepnerd/inpainting_gmcnn/blob/fe5295ea8029e59a9cd3ae5547463cf188450229/tensorflow/net/ops.py#L507 and

https://github.com/shepnerd/inpainting_gmcnn/blob/fe5295ea8029e59a9cd3ae5547463cf188450229/tensorflow/net/ops.py#L511

I can figure out:

  1. feat_A is the feature computed from predicted data
  2. feat_B is the feature computed from ground truth data

Then this function invokes mrf_loss:

mrf_loss(feat_A, feat_B, distance=config.Dist, nnsigma=config.nn_stretch_sigma)

In the definition of mrf_loss function:

https://github.com/shepnerd/inpainting_gmcnn/blob/fe5295ea8029e59a9cd3ae5547463cf188450229/tensorflow/net/ops.py#L409

I can figure out:

  1. T_features should be feature computed from ground truth data
  2. I_features should be feature computed from predicted data

So the order of parameters is not right? May be I misunderstand something. Could you help me check this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shepnerd/inpainting_gmcnn/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/AE1PCKDaGHf5lZCzWZZIGIGXwle6O6cHks5vZYg2gaJpZM4cEpXK .