def set_network(self, network_name, network_parameters): TorchNNRepresentation.set_network(self, network_name, network_parameters) # add a decoder to the network for the BiGAN decoder_class = decoders.get_decoder(network_name) self.network.decoder = decoder_class(config=network_parameters) # add a discriminator to the network for the BiGAN discriminator_class = discriminators.get_discriminator(network_name) self.network.discriminator = discriminator_class( config=network_parameters)
def set_network(self, network_name, network_parameters): TorchNNRepresentation.set_network(self, network_name, network_parameters) # add a decoder to the network for the SimCLR self.network.projection_head = ProjectionHead( config=network_parameters)
def set_network(self, network_name, network_parameters): TorchNNRepresentation.set_network(self, network_name, network_parameters)
def set_network(self, network_name, network_parameters): TorchNNRepresentation.set_network(self, network_name, network_parameters) # add attention head if self.network.encoder.config.use_attention: self.network.fc_cast = nn.Linear(self.config.network.parameters.n_latents * 4, self.config.network.parameters.n_latents)
def set_network(self, network_name, network_parameters): TorchNNRepresentation.set_network(self, network_name, network_parameters) # add a decoder to the network for the VAE decoder_class = decoders.get_decoder(network_name) self.network.decoder = decoder_class(config=network_parameters)