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

ProjectionHead setting in tf2 #213

Open
@geanshu

Description

@geanshu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions