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

ProjectionHead setting in tf2 #213

Open
geanshu opened this issue Feb 18, 2023 · 0 comments
Open

ProjectionHead setting in tf2 #213

geanshu opened this issue Feb 18, 2023 · 0 comments

Comments

@geanshu
Copy link

geanshu commented Feb 18, 2023

simclr/tf2/model.py

Lines 172 to 178 in 2fc637b

# for the middle layers, use bias and relu for the output.
self.linear_layers.append(
LinearLayer(
num_classes=lambda input_shape: int(input_shape[-1]),
use_bias=True,
use_bn=True,
name='nl_%d' % j))

simclr/tf2/model.py

Lines 143 to 146 in 2fc637b

self.dense = tf.keras.layers.Dense(
num_classes,
kernel_initializer=tf.keras.initializers.RandomNormal(stddev=0.01),
use_bias=self.use_bias and not self.use_bn)

You said, "for the middle layers, use bias and relu for the output." But as settings here, there will be no bias in the middle layers.

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

1 participant