Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant