Coder Social home page Coder Social logo

universal-correspondence-network's People

Contributors

tristanguigue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

universal-correspondence-network's Issues

the problem in the knn function

there is a piece of code in definition of the knn function

flat_feature2 = tf.reshape(feature2, (-1, feature_size_x * feature_size_y, feature_channels))
tf.subtract(tf.expand_dims(feature1_proj_at_corres, 2), tf.expand_dims(flat_feature2, 1)))

what does the code above do? I think that
the feature1_proj_at_corres should have the size of (Batch_size, nb_corr, channels)
and the flat_feature2 should have the size of (Batch_size, heigt* width,channels)
right?
so I don't know what do the tf.subtract() and the tf.expand_dims() do?
Looking forward to your reply. Thank you very much! :-)

The tf.negative() in the KNN definition

The code in your layers.py is as follows(in the KNN definition part):
distance = tf.negative(
tf.sqrt(tf.reduce_sum(tf.square(tf.subtract(
tf.expand_dims(feature1_proj_at_corres, 2), tf.expand_dims(flat_feature2, 1))), reduction_indices=3)))
flat_indices_nearest = tf.cast(tf.argmin(distance, 2), tf.int32)

We know the result of the tf.sqrt() is non-negative value, but you use a tf.negative() to make it become non-positive value. And then you use the tf.argmin() to choose the smallest value in dim_2.
But if numbers are non-positive, the smaller number has a bigger absolute value, which means the distance is bigger. So the result is not the most similar feature?
Looking forward to your reply~ Thank you very much :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.