예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 def set_network(self, network_name, network_parameters):
     TorchNNRepresentation.set_network(self, network_name,
                                       network_parameters)
예제 #4
0
 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)
예제 #5
0
 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)