예제 #1
0
  def get_generator_network(self):

    # The user can specify a custom network
    if self.create_network is not None:
      return self.create_network(self.out_shape)

    return util.get_default_network(self.out_shape, network_kwargs=self.network_kwargs)
예제 #2
0
  def get_inference(self, out_shape):
    out_shape = out_shape[:-1] + (2*out_shape[-1],)

    # The user can specify a custom network
    if self.create_network is not None:
      return self.create_inference(out_shape)

    return util.get_default_network(out_shape, network_kwargs=self.inference_network_kwargs)
예제 #3
0
파일: residual.py 프로젝트: jxzhangjhu/NuX
    def get_network(self, out_shape):

        # The user can specify a custom network
        if self.create_network is not None:
            return self.create_network(out_shape)

        return util.get_default_network(out_shape,
                                        network_kwargs=self.network_kwargs,
                                        lipschitz=True)
    def get_network(self, out_shape):
        if hasattr(self, "_network"):
            return self._network

        # The user can specify a custom network
        if self.create_network is not None:
            self._network = self.create_network(out_shape)

        else:
            self._network = util.get_default_network(
                out_shape, network_kwargs=self.network_kwargs)

        return self._network
예제 #5
0
 def get_network(self, out_shape):
     if self.create_network is not None:
         return self.create_network(out_shape)
     return util.get_default_network(out_shape,
                                     network_kwargs=self.network_kwargs,
                                     lipschitz=True)