Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pivot vector에 관한 issue #1

Open
yhy258 opened this issue Jul 16, 2021 · 3 comments
Open

pivot vector에 관한 issue #1

yhy258 opened this issue Jul 16, 2021 · 3 comments

Comments

@yhy258
Copy link

yhy258 commented Jul 16, 2021

코드에 있어서, pivot vector가 center point c를 원점으로 가져야 논문과 같이 v^proj, v^rej를 명확히 정의 할 수 있을 것 같은데, 굳이 c를 원점으로 같도록 p-c를 하지 않아줘도 알아서 학습이 되는건가요??

@shim94kr
Copy link
Collaborator

shim94kr commented Jul 16, 2021

fc = fc - tf.gather(centers, labels)

이 코드가 해당 부분 처리해 주는 것 같습니다.

@yhy258
Copy link
Author

yhy258 commented Jul 17, 2021

def discriminator_uncond_cifar10(input, cfg):
iFilterDimsD = cfg.iFilterDimsD
c = [2, 2, 2]
with tf.variable_scope('discriminator', reuse=tf.AUTO_REUSE):
h0 = input
h0 = optimized_block(h0, iFilterDimsD * 2, 'optimized_block1_nosn')
h0 = dropout(h0, cfg.fDropRate)
hc = h0
for i in range(3):
hc = block(hc, iFilterDimsD * c[i], name="block{}".format(i), downsample=i<2) # 32 * 32
hc = dropout(hc, cfg.fDropRate)
hc = tf.reduce_mean(hc, [1, 2])
fc = tf.contrib.layers.flatten(hc)
rf = tf.get_variable(
name='rf',
shape=[cfg.iK, iFilterDimsD * c[2]],
initializer=tf.orthogonal_initializer())
return fc, rf

이 코드에 보면 fc가 embedding vectors를 의미하는 것 같고, rf가 pivot vector 인 것 같은데, 이 pivot vector point 또한 c를 시작점으로 가져야 hypersphere에 존재하는 pivot vector 라고 할 수 있지 않는지 (pivot vector point에도 transformation이 필요하지 않는지)가 궁금합니다!

@shim94kr
Copy link
Collaborator

아, 네. pivot은 원점으로 옮긴 hypersphere상에서 정의하였기 때문에 따로 transformation을 해주지 않았습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants