Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding visibility of StyleGAN architecture for another project. #628

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def create_discriminator(
kernel_initializer: Optional[_KerasInitializer] = None,
use_fan_in_scaled_kernels: bool = True,
use_antialiased_bilinear_downsampling: bool = False,
num_channels: int = 3,
name: str = 'style_gan_v2_discriminator'):
"""Creates a Keras model for the discriminator architecture.

Expand All @@ -262,6 +263,7 @@ def create_discriminator(
ani-aliased bilinear downsampling with a [1, 3, 3, 1] tent kernel. If
false standard bilinear downsampling, i.e. average pooling is used ([1, 1]
tent kernel).
num_channels: The number of channels of the input tensor.
name: The name of the Keras model.

Returns:
Expand All @@ -271,7 +273,7 @@ def create_discriminator(
kernel_initializer = tf.keras.initializers.TruncatedNormal(
mean=0.0, stddev=1.0)

input_tensor = tf.keras.Input(shape=(None, None, 3))
input_tensor = tf.keras.Input(shape=(None, None, num_channels))
tensor = architectures_progressive_gan.from_rgb(
input_tensor=input_tensor,
use_fan_in_scaled_kernel=use_fan_in_scaled_kernels,
Expand Down