Abstract
The style-based GAN architecture (StyleGAN) yields state-of-the-art results in data-driven unconditional generative image modeling.
We expose and analyze several of its characteristic artifacts, and propose changes in both model architecture and training methods to address them.
In particular, we redesign the generator normalization, revisit progressive growing, and regularize the generator to encourage good conditioning in the mapping from latent codes to images.
In addition to improving image quality, this path length regularizer yields the additional benefit that the generator becomes significantly easier to invert.
This makes it possible to reliably attribute a generated image to a particular network.
We furthermore visualize how well the generator utilizes its output resolution, and identify a capacity problem, motivating us to train larger models for additional quality improvements.
Overall, our improved model redefines the state of the art in unconditional image modeling, both in terms of existing distribution quality metrics as well as perceived image quality.
스타일 기반 GAN 아키텍처 (StyleGAN)는 데이터 기반 무조건 생성 이미지 모델링에서 최첨단 결과를 제공합니다.
우리는 몇가지 특성 아티팩트를 노출 및 분석하고 이를 해결하기 위해 모델 아키텍처 및 교육 방법의 변경 사항을 제안합니다.
특히, 우리는 생성기 정규화를 재설계하고, 점진적 성장을 재검토하고, 생성기를 정규화하여 잠재 코드에서 이미지로의 매핑에서 좋은 조건을 장려합니다.
이미지 품질을 개선하는 것 외에도 이 경로 길이 정규화는 생성기가 반전하기 훨씬 쉬워지는 추가 이점을 제공합니다.
이를 통해 생성 된 이미지를 특정 네트워크에 안정적으로 어트 리뷰 션 할 수 있습니다.
또한 발전기가 출력 해상도를 얼마나 잘 활용하는지 시각화하고 용량 문제를 식별하여 추가 품질 개선을 위해 더 큰 모델을 훈련하도록 동기를 부여합니다.
전반적으로 개선된 모델은 기존 분포 품질 메트릭과인지 된 이미지 품질 측면에서 무조건 이미지 모델링의 최첨단을 재정의합니다.
1. Introduction
The resolution and quality of images produced by generative methods, especially generative adversarial networks(GAN) [16], are improving rapidly [23, 31, 5].
The current state-of-the-art method for high-resolution image synthesis is StyleGAN [24], which has been shown to work reliably on a variety of datasets.
Our work focuses on fixing its characteristic artifacts and improving the result quality further.
The distinguishing feature of StyleGAN [24] is its unconventional generator architecture.
Instead of feeding the input latent code z ∈ Z only to the beginning of a the network, the mapping network f first transforms it to an intermediate latent code w ∈ W.
Affine transforms then produce styles that control the layers of the synthesis network g via adaptive instance normalization (AdaIN) [21, 9, 13, 8].
Additionally, stochastic variation is facilitated by providing additional random noise maps to the synthesis network.
It has been demonstrated [24, 38] that this design allows the intermediate latent space W to be much less entangled than the input latent space Z.
In this paper, we focus all analysis solely on W, as it is the relevant latent space from the synthesis network’s point of view.
Many observers have noticed characteristic artifacts in images generated by StyleGAN [3].
생성적 방법, 특히 생성적 적대네트워크 (GAN) [16]에 의해 생성된 이미지의 해상도와 품질이 빠르게 향상되고 있습니다 [23, 31, 5].
고해상도 이미지 합성을 위한 현재의 최첨단 방법은 StyleGAN [24]으로, 다양한 데이터 세트에서 안정적으로 작동하는 것으로 나타났습니다.
우리의 작업은 특징적인 인공물을 수정하고 결과 품질을 더욱 향상시키는 데 중점을 둡니다.
StyleGAN[24]의 특징은 독창적인 생성기 아키텍처입니다.
입력 잠재 코드 z ∈ Z를 네트워크의 시작 부분에만 공급하는 대신 매핑 네트워크 f는 먼저 이를 중간 잠재 코드 w ∈ W로 변환합니다.
그런 다음 Affine 변환은 적응형 인스턴스 정규화 (AdaIN) [21, 9, 13, 8]를 통해 합성 네트워크 g의 계층을 제어하는 스타일을 생성합니다.
또한, 합성 네트워크에 추가 랜덤 노이즈 맵을 제공하여 확률적 변동이 용이합니다.
이 디자인은 중간 잠복 공간 W가 입력 잠복 공간 Z보다 훨씬 덜 얽히게 해준다는 것이 입증되었다 [24, 38].
이 백서에서는 합성 네트워크의 관점에서 볼 때 관련 잠재 공간이므로 W에만 모든 분석을 집중합니다.
많은 관찰자들이 StyleGAN [3]에 의해 생성 된 이미지에서 특징적인 인공데이터를 발견했습니다.
We identify two causes for these artifacts, and describe changes in architecture and training methods that eliminate them.
First, we investigate the origin of common blob-like artifacts, and find that the generator creates them to circumvent a design flaw in its architecture.
In Section 2, we redesign the normalization used in the generator, which removes the artifacts.
Second, we analyze artifacts related to progressive growing [23] that has been highly successful in stabilizing high-resolution GAN training.
We propose an alternative design that achieves the same goal — training starts by focusing on low-resolution images and then progressively shifts focus to higher and higher resolutions — without changing the network topology during training.
This new design also allows us to reason about the effective resolution of the generated images, which turns out to be lower than expected, motivating a capacity increase (Section 4).
Quantitative analysis of the quality of images produced using generative methods continues to be a challenging topic.
Frechet inception distance (FID) [ ´ 20] measures differences in the density of two distributions in the highdimensional feature space of an InceptionV3 classifier [39].
Precision and Recall (P&R) [36, 27] provide additional visibility by explicitly quantifying the percentage of generated images that are similar to training data and the percentage of training data that can be generated, respectively.
We use these metrics to quantify the improvements.
Both FID and P&R are based on classifier networks that have recently been shown to focus on textures rather than shapes [12], and consequently, the metrics do not accurately capture all aspects of image quality.
We observe that the perceptual path length (PPL) metric [24], originally introduced as a method for estimating the quality of latent space interpolations, correlates with consistency and stability of shapes.
Based on this, we regularize the synthesis network to favor smooth mappings (Section 3) and achieve a clear improvement in quality.
To counter its computational expense, we also propose executing all regularizations less frequently, observing that this can be done without compromising effectiveness.
Finally, we find that projection of images to the latent space W works significantly better with the new, pathlength regularized StyleGAN2 generator than with the original StyleGAN.
This makes it easier to attribute a generated image to its source (Section 5).
이러한 아티팩트의 두 가지 원인을 식별하고, 이를 제거하는 아키텍처 및 교육 방법의 변경 사항을 설명합니다.
먼저, 우리는 일반적인 얼룩과 같은 아티팩트의 기원을 조사하고 생성기가 아키텍처의 설계 결함을 회피하기 위해 생성한다는 것을 발견했습니다.
섹션 2에서는 아티팩트를 제거하는 생성기에서 사용되는 정규화를 다시 설계합니다.
둘째, 우리는 고해상도 GAN 훈련을 안정화하는데 매우 성공적이었던 점진적 성장 [23]과 관련된 인공물을 분석합니다.
우리는 동일한 목표를 달성하는 대체 설계를 제안합니다.
교육은 저해상도 이미지에 초점을 맞추는 것으로 시작한 다음 교육 중에 네트워크 토폴로지를 변경하지 않고 점진적으로 초점을 더 높은 해상도로 점진적으로 이동합니다.
이 새로운 디자인은 또한 생성된 이미지의 유효 해상도를 추론 할 수 있게하여 예상보다 낮은 것으로 판명되어 용량 증가에 동기를 부여합니다 (섹션 4).
생성 방법을 사용하여 생성 된 이미지의 품질에 대한 정량 분석은 계속해서 어려운 주제입니다.
FID (Frechet inception distance) [´20]는 InceptionV3 분류기 [39]의 고차원 특성 공간에서 두 분포의 밀도 차이를 측정합니다.
Precision and Recall (P & R) [36, 27]은 각각 학습 데이터와 유사한 생성 된 이미지의 백분율과 생성 할 수있는 훈련 데이터의 백분율을 명시적으로 정량화하여 추가적인 가시성을 제공합니다.
이러한 지표를 사용하여 개선 사항을 수량화합니다.
FID와 P & R은 모두 최근에 모양이 아닌 텍스처에 초점을 맞추는 것으로 나타난 분류기 네트워크를 기반으로하며 [12] 결과적으로 메트릭은 이미지 품질의 모든 측면을 정확하게 포착하지 못합니다.
우리는 원래 잠재 공간 보간의 품질을 평가하기위한 방법으로 도입 된 지각 경로 길이 (PPL) 메트릭 [24]이 모양의 일관성 및 안정성과 관련이 있음을 관찰합니다.
이를 바탕으로 부드러운 매핑(섹션 3)을 선호하고 품질을 명확하게 개선하기 위해 합성 네트워크를 정규화합니다.
계산 비용에 대응하기 위해 모든 정규화를 덜 자주 실행할 것을 제안하며, 이것이 효율성을 손상시키지 않고 수행 될 수 있음을 관찰합니다.
마지막으로, 잠재 공간 W에 대한 이미지 투영은 원래 StyleGAN보다 새로운 경로 길이 정규화 된 StyleGAN2 생성기를 사용하면 훨씬 더 잘 작동합니다.
이렇게하면 생성된 이미지를 소스에 더 쉽게 어트리뷰션 할 수 있습니다 (섹션 5).
2. Removing normalization artifacts 정규화 아티팩트 제거
We begin by observing that most images generated by StyleGAN exhibit characteristic blob-shaped artifacts that resemble water droplets.
As shown in Figure 1, even when the droplet may not be obvious in the final image, it is present in the intermediate feature maps of the generator.
The anomaly starts to appear around 64×64 resolution, is present in all feature maps, and becomes progressively stronger at higher resolutions.
The existence of such a consistent artifact is puzzling, as the discriminator should be able to detect it.
We pinpoint the problem to the AdaIN operation that normalizes the mean and variance of each feature map separately, thereby potentially destroying any information found in the magnitudes of the features relative to each other.
We hypothesize that the droplet artifact is a result of the generator intentionally sneaking signal strength information past instance normalization: by creating a strong, localized spike that dominates the statistics, the generator can effectively scale the signal as it likes elsewhere.
Our hypothesis is supported by the finding that when the normalization step is removed from the generator, as detailed below, the droplet artifacts disappear completely.
StyleGAN에 의해 생성된 대부분의 이미지가 물방울과 유사한 특징적인 얼룩 모양의 인공물을 나타내는 것을 관찰하는 것으로 시작합니다.
그림 1에서 볼 수 있듯이 물방울이 최종 이미지에서 명확하지 않더라도 생성기의 중간 특성 맵에 존재합니다.
이상 현상은 64x64 해상도 주변에서 나타나기 시작하고 모든 기능 맵에 존재하며 더 높은 해상도에서 점진적으로 더 강해집니다.
이러한 일관된 아티팩트의 존재는 판별자가 이를 감지 할 수 있어야하기 때문에 당혹스럽습니다.
우리는 각 특징 맵의 평균과 분산을 개별적으로 정규화하는 AdaIN 연산에 문제를 정확히 지적하여 서로 상대적인 특징의 크기에서 발견 된 모든 정보를 잠재적으로 파괴합니다.
우리는 물방울 아티팩트가 생성기가 인스턴스 정규화를지나 신호 강도 정보를 의도적으로 몰래 숨겨서 발생한 결과라고 가정합니다.
통계를 지배하는 강력하고 국부 화 된 스파이크를 생성함으로써 생성기가 다른 곳에서 좋아하는 것처럼 신호를 효과적으로 스케일링 할 수 있습니다.
우리의 가설은 아래에 설명 된 것처럼 정규화 단계가 생성기에서 제거 될 때 액적 아티팩트가 완전히 사라진다는 발견으로 뒷받침됩니다.
2.1. Generator architecture revisited 재검토 된 발전기 아키텍처
We will first revise several details of the StyleGAN generator to better facilitate our redesigned normalization.
These changes have either a neutral or small positive effect on their own in terms of quality metrics.
Figure 2a shows the original StyleGAN synthesis network g [24], and in Figure 2b we expand the diagram to full detail by showing the weights and biases and breaking the AdaIN operation to its two constituent parts: normalization and modulation.
This allows us to re-draw the conceptual gray boxes so that each box indicates the part of the network where one style is active (i.e., “style block”).
Interestingly, the original StyleGAN applies bias and noise within the style block, causing their relative impact to be inversely proportional to the current style’s magnitudes.
We observe that more predictable results are obtained by moving these operations outside the style block, where they operate on normalized data.
Furthermore, we notice that after this change it is sufficient for the normalization and modulation to operate on the standard deviation alone (i.e., the mean is not needed).
The application of bias, noise, and normalization to the constant input can also be safely removed without observable drawbacks.
This variant is shown in Figure 2c, and serves as a starting point for our redesigned normalization.
재설계된 정규화를 보다 용이하게하기 위해 먼저 StyleGAN 생성기의 몇 가지 세부 사항을 수정합니다.
이러한 변화는 품질 메트릭 측면에서 그 자체로 중립적이거나 작은 긍정적 인 영향을 미칩니다.
그림 2a는 원래 StyleGAN 합성 네트워크 g [24]를 보여줍니다. 그림 2b에서는 가중치와 바이어스를 표시하고 AdaIN 연산을 정규화 및 변조라는 두 가지 구성 부분으로 분리하여 다이어그램을 전체 세부 사항으로 확장합니다.
이를 통해 개념적 회색 상자를 다시 그릴 수 있으므로 각 상자는 하나의 스타일이 활성화 된 네트워크 부분 (즉, "스타일 블록")을 나타냅니다.
흥미롭게도 원래 StyleGAN은 스타일 블록 내에 바이어스와 노이즈를 적용하여 상대적 영향이 현재 스타일의 크기에 반비례하도록합니다.
이러한 작업을 정규화 된 데이터에서 작업하는 스타일 블록 외부로 이동하면보다 예측 가능한 결과를 얻을 수 있습니다.
또한이 변경 후에는 정규화 및 변조가 표준 편차에서만 작동하는 것으로 충분하다는 것을 알 수 있습니다 (즉, 평균이 필요하지 않음).
일정한 입력에 대한 바이어스, 노이즈 및 정규화를 적용하는 것도 눈에 띄는 단점없이 안전하게 제거 할 수 있습니다.
이 변형은 그림 2c에 표시되며 재 설계된 정규화의 시작점 역할을 합니다.
2.2. Instance normalization revisited 인스턴스 정규화 재검토
One of the main strengths of StyleGAN is the ability to control the generated images via style mixing, i.e., by feeding a different latent w to different layers at inference time.
In practice, style modulation may amplify certain feature maps by an order of magnitude or more.
For style mixing to work, we must explicitly counteract this amplification on a per-sample basis — otherwise the subsequent layers would not be able to operate on the data in a meaningful way.
If we were willing to sacrifice scale-specific controls (see video), we could simply remove the normalization, thus removing the artifacts and also improving FID slightly [27].
We will now propose a better alternative that removes the artifacts while retaining full controllability.
The main idea is to base normalization on the expected statistics of the incoming feature maps, but without explicit forcing.
Recall that a style block in Figure 2c consists of modulation, convolution, and normalization.
Let us start by considering the effect of a modulation followed by a convolution.
The modulation scales each input feature map of the convolution based on the incoming style, which can alternatively be implemented by scaling the convolution weights:
StyleGAN의 주요 강점 중 하나는 스타일 믹싱을 통해 생성 된 이미지를 제어 할 수 있다는 것입니다.
실제로 스타일 변조는 특정 특징 맵을 몇 배 이상 증폭시킬 수 있습니다.
스타일 믹싱이 작동하려면 샘플 단위로이 증폭에 대해 명시 적으로 대응해야합니다. 그렇지 않으면 후속 레이어가 데이터에서 의미있는 방식으로 작동 할 수 없습니다.
스케일 별 컨트롤 (비디오 참조)을 기꺼이 희생하려는 경우 정규화를 제거하여 아티팩트를 제거하고 FID를 약간 개선 할 수 있습니다 [27].
이제 완전한 제어 성을 유지하면서 아티팩트를 제거하는 더 나은 대안을 제안 할 것입니다.
주요 아이디어는 들어오는 기능 맵의 예상 통계를 기준으로 정규화를 기반으로하지만 명시적인 강제는 사용하지 않는 것입니다.
그림 2c의 스타일 블록은 변조, 컨볼 루션 및 정규화로 구성됩니다.
컨볼루션이 뒤 따르는 변조의 효과를 고려하여 시작하겠습니다.
변조는 수신 스타일에 따라 컨볼 루션의 각 입력 기능 맵을 조정하며, 이는 또는 컨볼 루션 가중치를 조정하여 구현할 수 있습니다.
(1) :
(1) where w and w0 are the original and modulated weights, respectively, si is the scale corresponding to the ith input feature map, and j and k enumerate the output feature maps and spatial footprint of the convolution, respectively.
Now, the purpose of instance normalization is to essentially remove the effect of s from the statistics of the convolution’s output feature maps.
We observe that this goal can be achieved more directly. Let us assume that the input activations are i.i.d. random variables with unit standard deviation.
After modulation and convolution, the output activations have standard deviation of (2)
(1) w와 w0은 각각 원래 가중치와 변조 된 가중치이고, si는 i 번째 input feature 맵에 해당하는 스케일이고 j와 k는 각각 컨볼 루션의 출력 피쳐 맵과 공간 풋 프린트를 열거합니다.
이제 인스턴스 정규화의 목적은 본질적으로 컨볼 루션의 출력 특성 맵 통계에서 s의 효과를 제거하는 것입니다.
우리는이 목표가보다 직접적으로 달성 될 수 있음을 관찰합니다. 입력 활성화가 i.i.d라고 가정합시다. 단위 표준 편차가있는 랜덤 변수.
변조 및 컨볼 루션 후 출력 활성화의 표준 편차는 (2)입니다.
(2) :
i.e., the outputs are scaled by the L2 norm of the corresponding weights.
The subsequent normalization aims to restore the outputs back to unit standard deviation.
Based on Equation 2, this is achieved if we scale (“demodulate”) each output feature map j by 1/σj .
Alternatively, we can again bake this into the convolution weights: (3)
즉, 출력은 해당 가중치의 L2 표준에 따라 조정됩니다.
후속 정규화는 출력을 단위 표준 편차로 다시 복원하는 것을 목표로합니다.
방정식 2를 기반으로, 각 출력 특성 맵 j를 1 / σj로 스케일 ("복조"demodulate)하면 이는 달성됩니다.
또는 이것을 convolution weights로 다시 구울 수 있습니다 : (3)
(3) :
(3) where is a small constant to avoid numerical issues.
We have now baked the entire style block to a single convolution layer whose weights are adjusted based on s using Equations 1 and 3 (Figure 2d).
Compared to instance normalization, our demodulation technique is weaker because it is based on statistical assumptions about the signal instead of actual contents of the feature maps.
Similar statistical analysis has been extensively used in modern network initializers [14, 19], but we are not aware of it being previously used as a replacement for data-dependent normalization.
Our demodulation is also related to weight normalization [37] that performs the same calculation as a part of reparameterizing the weight tensor.
Prior work has identified weight normalization as beneficial in the context of GAN training [43].
Our new design removes the characteristic artifacts (Figure 3) while retaining full controllability, as demonstrated in the accompanying video.
FID remains largely unaffected(Table 1, rows A, B), but there is a notable shift from precision to recall.
We argue that this is generally desirable, since recall can be traded into precision via truncation, whereas the opposite is not true [27].
In practice our design can be implemented efficiently using grouped convolutions, as detailed in Appendix B.
To avoid having to account for the activation function in Equation 3, we scale our activation functions so that they retain the expected signal variance.
(3) 숫자 문제를 피하기 위해 작은 상수는 어디에 있습니까?
이제 전체 스타일 블록을 방정식 1과 3을 사용하여 s에 따라 가중치가 조정되는 단일 컨볼 루션 레이어로 베이킹했습니다 (그림 2d).
인스턴스 정규화에 비해 복조 기술은 기능 맵의 실제 내용이 아닌 신호에 대한 통계적 가정을 기반으로하기 때문에 약합니다.
유사한 통계 분석이 현대 네트워크 이니셜 라이저 [14, 19]에서 광범위하게 사용되었지만 이전에 데이터 종속 정규화의 대체물로 사용되었다는 사실을 알지 못합니다.
복조는 가중치 텐서를 다시 매개 변수화하는 것과 동일한 계산을 수행하는 가중치 정규화 [37] 와도 관련이 있습니다.
이전 작업은 GAN 훈련의 맥락에서 유익한 것으로 가중치 정규화를 확인했습니다 [43].
우리의 새로운 디자인은 함께 제공되는 비디오에서 보여 주듯이 완전한 제어 성을 유지하면서 특징적인 아티팩트를 제거합니다 (그림 3).
FID는 크게 영향을받지 않지만 (표 1, A, B 행) 정밀도에서 회수로의 눈에 띄는 변화가 있습니다.
우리는 리콜이 잘림을 통해 정밀도로 교환 될 수 있지만 그 반대는 사실이 아니기 때문에 이것이 일반적으로 바람직하다고 주장합니다 [27].
실제로 우리의 디자인은 부록 B에 자세히 설명 된대로 그룹화 된 컨볼 루션을 사용하여 효율적으로 구현할 수 있습니다.
방정식 3의 활성화 함수를 설명 할 필요가 없도록 활성화 함수를 확장하여 예상 신호 분산을 유지합니다.
3. Image quality and generator smoothness 이미지 품질 및 생성기 부드러움
While GAN metrics such as FID or Precision and Recall (P&R) successfully capture many aspects of the generator, they continue to have somewhat of a blind spot for image quality.
For an example, refer to Figures 13 and 14 that contrast generators with identical FID and P&R scores but markedly different overall quality.
We observe a correlation between perceived image quality and perceptual path length (PPL) [24], a metric that was originally introduced for quantifying the smoothness of the mapping from a latent space to the output image by measuring average LPIPS distances [50] between generated images under small perturbations in latent space.
Again consulting Figures 13 and 14, a smaller PPL (smoother generator mapping) appears to correlate with higher overall image quality, whereas other metrics are blind to the change.
Figure 4 examines this correlation more closely through per-image PPL scores on LSUN CAT, computed by sampling the latent space around w ∼ f(z).
Low scores are indeed indicative of high-quality images, and vice versa. Figure 5a shows the corresponding histogram and reveals the long tail of the distribution.
The overall PPL for the model is simply the expected value of these per-image PPL scores.
FID 또는 P & R (Precision and Recall)과 같은 GAN 메트릭은 생성기의 여러 측면을 성공적으로 캡처하지만 이미지 품질에 대해 약간의 사각 지대를 계속 가지고 있습니다.
예를 들어, FID 및 P & R 점수는 동일하지만 전반적인 품질이 현저하게 다른 생성기를 대조하는 그림 13 및 14를 참조하십시오.
우리는 인식 된 이미지 품질과 지각 경로 길이 (PPL) [24] 사이의 상관 관계를 관찰합니다. 이는 생성 된 사이의 평균 LPIPS 거리 [50]를 측정하여 잠재 공간에서 출력 이미지로 매핑의 부드러움을 정량화하기 위해 원래 도입된 메트릭입니다. 잠복 공간에서 작은 섭동 아래의 이미지.
다시 그림 13과 14를 참조하면 더 작은 PPL (smoother generator mapping)은 더 높은 전체 이미지 품질과 상관 관계가있는 것처럼 보이지만 다른 메트릭은 변화를 알지 못합니다.
그림 4는 w ~ f (z) 주변의 잠재 공간을 샘플링하여 계산 된 LSUN CAT의 이미지 별 PPL 점수를 통해이 상관 관계를보다 자세히 조사합니다.
낮은 점수는 실제로 고품질 이미지를 나타내며 그 반대의 경우도 마찬가지입니다. 그림 5a는 해당하는 히스토그램을 보여주고 분포의 긴 꼬리를 보여줍니다.
모델의 전체 PPL은 단순히 이러한 이미지 당 PPL 점수의 예상 값입니다.
We always compute PPL for the entire image, as opposed to Karras et al. [24] who use a smaller central crop.
It is not immediately obvious why a low PPL should correlate with image quality.
We hypothesize that during training, as the discriminator penalizes broken images, the most direct way for the generator to improve is to effectively stretch the region of latent space that yields good images.
This would lead to the low-quality images being squeezed into small latent space regions of rapid change.
While this improves the average output quality in the short term, the accumulating distortions impair the training dynamics and consequently the final image quality.
Clearly, we cannot simply encourage minimal PPL since that would guide the generator toward a degenerate solution with zero recall.
Instead, we will describe a new regularizer that aims for a smoother generator mapping without this drawback.
As the resulting regularization term is somewhat expensive to compute, we first describe a general optimization that applies to any regularization technique.
Karras et al.과는 달리 항상 전체 이미지에 대한 PPL을 계산합니다. 작은 중앙 작물을 사용하는 사람.
낮은 PPL이 이미지 품질과 연관되어야하는 이유는 즉시 명확하지 않습니다.
훈련 중에 판별자가 깨진 이미지에 페널티를 주므로 생성기가 개선하는 가장 직접적인 방법은 좋은 이미지를 생성하는 잠복 영역을 효과적으로 늘리는 것이라고 가정합니다.
이로 인해 저품질 이미지가 급격한 변화의 작은 잠복 영역으로 압착됩니다.
이렇게하면 단기적으로 평균 출력 품질이 향상되지만 누적되는 왜곡으로 인해 훈련 역학이 손상되어 결과적으로 최종 이미지 품질이 저하됩니다.
분명히, 우리는 최소한의 PPL을 권장 할 수 없습니다. 그렇게하면 생성기를 리콜이없는 퇴화 솔루션으로 안내 할 수 있기 때문입니다.
대신, 우리는 이러한 단점없이 더 부드러운 생성기 매핑을 목표로하는 새로운 정규화기를 설명 할 것입니다.
결과 정규화 용어는 계산하는 데 다소 비용이 많이 들기 때문에 먼저 모든 정규화 기술에 적용되는 일반적인 최적화를 설명합니다.
3.1. Lazy regularization
Typically the main loss function (e.g., logistic loss [16]) and regularization terms (e.g., R1 [30]) are written as a single expression and are thus optimized simultaneously.
We observe that the regularization terms can be computed less frequently than the main loss function, thus greatly diminishing their computational cost and the overall memory usage.
Table 1, row C shows that no harm is caused when R1 regularization is performed only once every 16 minibatches, and we adopt the same strategy for our new regularizer as well.
Appendix B gives implementation details.
일반적으로 주요 손실 함수 (예 : 로지스틱 손실 [16]) 및 정규화 항 (예 : R1 [30])은 단일 표현식으로 작성되므로 동시에 최적화됩니다.
정규화 항은 주 손실 함수보다 덜 자주 계산 될 수 있으므로 계산 비용과 전체 메모리 사용량을 크게 줄일 수 있습니다.
표 1, C 행은 R1 정규화가 16 개의 미니 배치마다 한 번만 수행 될 때 아무런 해가 없음을 보여 주며, 새로운 정규화기에 대해서도 동일한 전략을 채택합니다.
부록 B는 구현 세부 사항을 제공합니다.
3.2. Path length regularization 경로 길이 정규화
We would like to encourage that a fixed-size step in W results in a non-zero, fixed-magnitude change in the image.
We can measure the deviation from this ideal empirically by stepping into random directions in the image space and observing the corresponding w gradients.
These gradients should have close to an equal length regardless of w or the image-space direction, indicating that the mapping from the latent space to image space is well-conditioned [33].
At a single w ∈ W, the local metric scaling properties of the generator mapping g(w) : W 7→ Y are captured by the Jacobian matrix Jw = ∂g(w)/∂w.
Motivated by the desire to preserve the expected lengths of vectors regardless of the direction, we formulate our regularizer as (4)
W에서 고정 크기 단계를 수행하면 이미지에서 0이 아닌 고정 크기 변경이 발생하도록 권장하고 싶습니다.
이미지 공간에서 임의의 방향으로 이동하고 해당하는 w 기울기를 관찰하여이 이상과의 편차를 경험적으로 측정 할 수 있습니다.
이러한 기울기는 w 또는 이미지 공간 방향에 관계없이 동일한 길이에 가까워 야하며, 이는 잠복 공간에서 이미지 공간으로의 매핑이 잘 조절되어 있음을 나타냅니다 [33].
단일 w ∈ W에서 생성기 매핑 g (w) : W 7 → Y의 로컬 메트릭 스케일링 속성은 야 코비 행렬 Jw = ∂g (w) / ∂w에 의해 캡처됩니다.
방향에 관계없이 벡터의 예상 길이를 보존하려는 욕구에 동기를 부여하여 정규화를 다음과 같이 공식화합니다. (4)
(4):
(4) where y are random images with normally distributed pixel intensities, and w ∼ f(z), where z are normally distributed.
We show in Appendix C that, in high dimensions, this prior is minimized when Jw is orthogonal (up to a global scale) at any w.
An orthogonal matrix preserves lengths and introduces no squeezing along any dimension.
To avoid explicit computation of the Jacobian matrix, we use the identity JTwy = ∇w(g(w) · y), which is efficiently computable using standard backpropagation [6].
The constant a is set dynamically during optimization as the long-running exponential moving average of the lengths kJT wyk2, allowing the optimization to find a suitable global scale by itself.
Our regularizer is closely related to the Jacobian clamping regularizer presented by Odena et al. [33].
Practical differences include that we compute the products J_Twy analytically whereas they use finite differences for estimating Jwδ with Z 3 δ ∼ N (0, I).
It should be noted that spectral normalization [31] of the generator [46] only constrains the largest singular value, posing no constraints on the others and hence not necessarily leading to better conditioning.
We find that enabling spectral normalization in addition to our contributions — or instead of them — invariably compromises FID, as detailed in Appendix E.
In practice, we notice that path length regularization leads to more reliable and consistently behaving models, making architecture exploration easier.
We also observe that the smoother generator is significantly easier to invert (Section 5).
Figure 5b shows that path length regularization clearly tightens the distribution of per-image PPL scores, without pushing the mode to zero.
However, Table 1, row D points toward a tradeoff between FID and PPL in datasets that are less structured than FFHQ.
(4) 여기서 y는 픽셀 강도가 정규 분포 된 임의의 이미지이고, z는 정규 분포를 따르는 w ∼ f (z)입니다.
우리는 부록 C에서 높은 차원에서 Jw가 모든 w에서 직교 (전역 규모까지) 일 때이 사전이 최소화된다는 것을 보여줍니다.
직교 행렬은 길이를 유지하고 어떤 차원을 따라 짜 내지 않습니다.
야 코비 행렬의 명시 적 계산을 피하기 위해 표준 역 전파 [6]를 사용하여 효율적으로 계산할 수있는 항등 JTwy = ∇w (g (w) · y)를 사용합니다.
상수 a는 길이 kJT wyk2의 장기 실행 지수 이동 평균으로 최적화 중에 동적으로 설정되어 최적화가 자체적으로 적절한 글로벌 스케일을 찾을 수 있도록합니다.
정규화 기는 Odena 등이 제시 한 Jacobian 클램핑 정규화 기와 밀접한 관련이 있습니다. [33].
실제적인 차이점은 J_Twy 제품을 분석적으로 계산하는 반면 Z 3 δ ∼ N (0, I)을 사용하여 Jwδ를 추정하기 위해 유한 차분을 사용한다는 것입니다.
생성기 [46]의 스펙트럼 정규화 [31]는 가장 큰 특이 값 만 제한하고 다른 값에는 제한을 두지 않으므로 반드시 더 나은 컨디셔닝으로 이어지지는 않습니다.
우리의 기여에 추가로 또는 그 대신에 스펙트럼 정규화를 활성화하면 부록 E에 자세히 설명 된 것처럼 항상 FID가 손상됩니다.
실제로 경로 길이 정규화가보다 안정적이고 일관되게 작동하는 모델을 만들어 아키텍처 탐색을 더 쉽게 만듭니다.
또한 더 부드러운 생성기가 반전하기 훨씬 더 쉽다는 것을 알 수 있습니다 (섹션 5).
그림 5b는 경로 길이 정규화가 모드를 0으로 밀지 않고 이미지 당 PPL 점수의 분포를 명확하게 강화한다는 것을 보여줍니다.
그러나 표 1의 D 행은 FFHQ보다 구조화되지 않은 데이터 세트에서 FID와 PPL 간의 절충을 가리 킵니다.
4. Progressive growing revisited 재검토되는 점진적 성장
Progressive growing [23] has been very successful in stabilizing high-resolution image synthesis, but it causes its own characteristic artifacts.
The key issue is that the progressively grown generator appears to have a strong location preference for details;
the accompanying video shows that when features like teeth or eyes should move smoothly over the image, they may instead remain stuck in place before jumping to the next preferred location.
Figure 6 shows a related artifact.
We believe the problem is that in progressive growing each resolution serves momentarily as the output resolution, forcing it to generate maximal frequency details, which then leads to the trained network to have excessively high frequencies in the intermediate layers, compromising shift invariance [49].
Appendix A shows an example.
These issues prompt us to search for an alternative formulation that would retain the benefits of progressive growing without the drawbacks.
점진적 성장 [23]은 고해상도 이미지 합성을 안정화하는 데 매우 성공적 이었지만 고유 한 아티팩트를 유발합니다.
핵심 문제는 점진적으로 성장하는 발전기가 세부 사항에 대해 강력한 위치 선호도를 갖는 것으로 보인다는 것입니다.
첨부 된 비디오는 치아나 눈과 같은 특징이 이미지 위에서 부드럽게 움직여야 할 때 다음 선호하는 위치로 점프하기 전에 대신 제자리에 고정되어있을 수 있음을 보여줍니다.
그림 6은 관련 아티팩트를 보여줍니다.
우리는 점진적 성장에서 각 해상도가 순간적으로 출력 해상도로 작용하여 최대 주파수 세부 정보를 생성하도록하여 훈련 된 네트워크가 중간 계층에서 지나치게 높은 주파수를 가지게하여 이동 불변성을 손상 시킨다는 것이 문제라고 생각합니다 [49].
부록 A에 예가 나와 있습니다.
이러한 문제는 단점없이 점진적 성장의 이점을 유지할 수있는 대체 공식을 찾도록 촉구합니다.
4.1. Alternative network architectures 대체 네트워크 아키텍처
While StyleGAN uses simple feedforward designs in the generator (synthesis network) and discriminator, there is a vast body of work dedicated to the study of better network architectures.
Skip connections [34, 22], residual networks [18, 17, 31], and hierarchical methods [7, 47, 48] have proven highly successful also in the context of generative methods.
As such, we decided to re-evaluate the network design of StyleGAN and search for an architecture that produces high-quality images without progressive growing.
Figure 7a shows MSG-GAN [22], which connects the matching resolutions of the generator and discriminator using multiple skip connections.
The MSG-GAN generator is modified to output a mipmap [42] instead of an image,and a similar representation is computed for each real image as well. In Figure 7b we simplify this design by upsampling and summing the contributions of RGB outputs corresponding to different resolutions.
In the discriminator, we similarly provide the downsampled image to each resolution block of the discriminator.
We use bilinear filtering in all up and downsampling operations.
StyleGAN은 생성기 (합성 네트워크) 및 판별 기에서 간단한 피드 포워드 설계를 사용하지만 더 나은 네트워크 아키텍처 연구에 전념하는 방대한 양의 작업이 있습니다.
스킵 연결 [34, 22], 잔여 네트워크 [18, 17, 31] 및 계층 적 방법 [7, 47, 48]은 생성 방법의 맥락에서도 매우 성공적인 것으로 입증되었습니다.
따라서 우리는 StyleGAN의 네트워크 디자인을 재평가하고 점진적으로 성장하지 않고 고품질 이미지를 생성하는 아키텍처를 찾기로 결정했습니다.
그림 7a는 다중 스킵 연결을 사용하여 생성기와 판별 기의 일치하는 해상도를 연결하는 MSG-GAN [22]을 보여줍니다.
MSG-GAN 생성기는 이미지 대신 밉맵 [42]을 출력하도록 수정되었으며 각 실제 이미지에 대해서도 유사한 표현이 계산됩니다. 그림 7b에서 우리는 다른 해상도에 해당하는 RGB 출력의 기여도를 업 샘플링하고 합산하여이 디자인을 단순화합니다.
판별 기에서 유사하게 판별 기의 각 해상도 블록에 다운 샘플링 된 이미지를 제공합니다.
모든 업 샘플링 및 다운 샘플링 작업에서 이중 선형 필터링을 사용합니다.
In Figure 7c we further modify the design to use residual connections.
This design is similar to LAPGAN [7] without the per-resolution discriminators employed by Denton et al. Table 2 compares three generator and three discriminator architectures: original feedforward networks as used in StyleGAN, skip connections, and residual networks, all trained without progressive growing.
FID and PPL are provided for each of the 9 combinations.
We can see two broad trends: skip connections in the generator drastically improve PPL in all configurations, and a residual discriminator network is clearly beneficial for FID.
The latter is perhaps not surprising since the structure of discriminator resembles classifiers where residual architectures are known to be helpful.
However, a residual architecture was harmful in the generator — the lone exception was FID in LSUN CAR when both networks were residual.
For the rest of the paper we use a skip generator and a residual discriminator, without progressive growing.
This corresponds to configuration E in Table 1, and it significantly improves FID and PPL.
그림 7c에서는 잔여 연결을 사용하도록 설계를 추가로 수정합니다.
이 디자인은 Denton 등이 사용하는 해상도 별 판별자가없는 LAPGAN [7]과 유사합니다. 표 2는 세 가지 생성기 및 세 가지 판별 자 아키텍처를 비교합니다. 즉, StyleGAN에서 사용되는 원래 피드 포워드 네트워크, 스킵 연결 및 잔여 네트워크, 모두 점진적 성장없이 훈련되었습니다.
9 개 조합 각각에 대해 FID 및 PPL이 제공됩니다.
두 가지 광범위한 추세를 볼 수 있습니다. 생성기의 스킵 연결은 모든 구성에서 PPL을 대폭 향상시키고 잔여 판별 자 네트워크는 FID에 분명히 도움이됩니다.
구분자의 구조가 잔여 아키텍처가 도움이되는 것으로 알려진 분류기와 유사하기 때문에 후자는 아마도 놀라운 일이 아닐 것입니다.
그러나 잔여 아키텍처는 생성기에서 유해했습니다. 두 네트워크가 모두 잔여 일 때 유일한 예외는 LSUN CAR에서 FID였습니다.
나머지 논문에서는 점진적 성장없이 스킵 생성기와 잔여 판별자를 사용합니다.
이는 표 1의 구성 E에 해당하며 FID 및 PPL을 크게 향상시킵니다.
4.2. Resolution usage 해상도 사용법
The key aspect of progressive growing, which we would like to preserve, is that the generator will initially focus on low-resolution features and then slowly shift its attention to finer details.
The architectures in Figure 7 make it possible for the generator to first output low resolution images that are not affected by the higher-resolution layers in a significant way, and later shift the focus to the higher-resolution layers as the training proceeds.
Since this is not enforced in any way, the generator will do it only if it is beneficial.
To analyze the behavior in practice, we need to quantify how strongly the generator relies on particular resolutions over the course of training.
Since the skip generator (Figure 7b) forms the image by explicitly summing RGB values from multiple resolutions, we can estimate the relative importance of the corresponding layers by measuring how much they contribute to the final image.
In Figure 8a, we plot the standard deviation of the pixel values produced by each tRGB layer as a function of training time.
We calculate the standard deviations over1024 random samples of w and normalize the values so that they sum to 100%.
At the start of training, we can see that the new skip generator behaves similar to progressive growing — now achieved without changing the network topology.
우리가 보존하고 싶은 점진적 성장의 핵심 측면은 생성기가 처음에는 저해상도 기능에 초점을 맞춘 다음 천천히 세부 사항으로주의를 이동한다는 것입니다.
그림 7의 아키텍처를 사용하면 생성기가 먼저 고해상도 레이어의 영향을받지 않는 저해상도 이미지를 출력하고 나중에 훈련이 진행됨에 따라 초점을 고해상도 레이어로 이동할 수 있습니다.
이것은 어떤 방식으로도 시행되지 않기 때문에 생성기는 유익한 경우에만 이를 수행합니다.
실제로 동작을 분석하려면 생성기가 훈련 과정에서 특정 해상도에 얼마나 강하게 의존하는지 정량화해야합니다.
스킵 생성기 (그림 7b)는 여러 해상도의 RGB 값을 명시 적으로 합산하여 이미지를 형성하므로 최종 이미지에 얼마나 기여하는지 측정하여 해당 레이어의 상대적 중요도를 추정 할 수 있습니다.
그림 8a에서는 훈련 시간의 함수로 각 tRGB 레이어에서 생성 된 픽셀 값의 표준 편차를 플로팅합니다.
w의 임의 샘플 1024 개에 대한 표준 편차를 계산하고 합계가 100 %가되도록 값을 정규화합니다.
훈련을 시작할 때 새로운 스킵 생성기가 점진적 성장과 유사하게 작동하는 것을 볼 수 있습니다. 이제 네트워크 토폴로지를 변경하지 않고도 달성 할 수 있습니다.
It would thus be reasonable to expect the highest resolution to dominate towards the end of the training.
The plot, however,shows that this fails to happen in practice, which indicates that the generator may not be able to “fully utilize” the target resolution.
To verify this, we inspected the generated images manually and noticed that they generally lack some of the pixel-level detail that is present in the training data — the images could be described as being sharpened versions of 5122 images instead of true 10242 images.
This leads us to hypothesize that there is a capacity problem in our networks, which we test by doubling the number of feature maps in the highest-resolution layers of both networks.4 This brings the behavior more in line with expectations:
Figure 8b shows a significant increase in the contribution of the highest-resolution layers, and Table 1, row F shows that FID and Recall improve markedly.
The last row shows that baseline StyleGAN also benefits from additional capacity, but its quality remains far below StyleGAN2.
Table 3 compares StyleGAN and StyleGAN2 in four LSUN categories, again showing clear improvements in FID and significant advances in PPL.
It is possible that further increases in the size could provide additional benefits.
따라서 훈련이 끝날 무렵 가장 높은 해상도가 지배 할 것으로 기대하는 것이 합리적입니다.
그러나 플롯은 이것이 실제로 발생하지 않는다는 것을 보여줍니다. 이는 생성기가 목표 해상도를 "완전히 활용"할 수 없음을 나타냅니다.
이를 확인하기 위해 생성 된 이미지를 수동으로 검사 한 결과 일반적으로 학습 데이터에있는 픽셀 수준의 세부 정보가 부족하다는 사실을 발견했습니다. 이미지는 실제 10242 이미지가 아닌 5122 이미지의 선명해진 버전으로 설명 될 수 있습니다.
이를 통해 네트워크에 용량 문제가 있다는 가설을 세울 수 있으며, 두 네트워크의 최고 해상도 계층에서 기능 맵의 수를 두 배로 늘려 테스트합니다 .4 이는 예상치에 더 부합하는 동작을 가져옵니다.
그림 8b는 가장 높은 해상도 레이어의 기여도가 크게 증가한 것을 보여 주며, 표 1의 F 행은 FID 및 Recall이 현저하게 향상되었음을 보여줍니다.
마지막 행은 기준 StyleGAN도 추가 용량의 이점을 얻지 만 품질은 StyleGAN2보다 훨씬 낮다는 것을 보여줍니다.
표 3은 4 개의 LSUN 범주에서 StyleGAN과 StyleGAN2를 비교하여 FID의 명확한 개선과 PPL의 상당한 발전을 다시 보여줍니다.
크기를 추가로 늘리면 추가 이점이 제공 될 수 있습니다.
5. Projection of images to latent space 잠재 공간에 이미지 투사
Inverting the synthesis network g is an interesting problem that has many applications.
Manipulating a given image in the latent feature space requires finding a matching latent code w for it first.
Previous research [1, 10] suggests that instead of finding a common latent code w, the results improve if a separate w is chosen for each layer of the generator.
The same approach was used in an early encoder implementation [32].
While extending the latent space in this fashion finds a closer match to a given image, it also enables projecting arbitrary images that should have no latent representation.
Instead, we concentrate on finding latent codes in the original, unextended latent space, as these correspond to images that the generator could have produced.
Our projection method differs from previous methods in two ways.
First, we add ramped-down noise to the latent code during optimization in order to explore the latent space more comprehensively.
Second, we also optimize the stochastic noise inputs of the StyleGAN generator, regularizing them to ensure they do not end up carrying coherent signal.
The regularization is based on enforcing the autocorrelation coefficients of the noise maps to match those of unit Gaussian noise over multiple scales.
Details of our projection method can be found in Appendix D.
합성 네트워크 g를 반전시키는 것은 많은 응용이있는 흥미로운 문제입니다.
잠복 기능 공간에서 주어진 이미지를 조작하려면 먼저 일치하는 잠복 코드 w를 찾아야합니다.
이전 연구 [1, 10]에 따르면 공통 잠복 코드 w를 찾는 대신 생성기의 각 레이어에 대해 별도의 w를 선택하면 결과가 향상됩니다.
초기 인코더 구현에서 동일한 접근 방식이 사용되었습니다 [32].
이러한 방식으로 잠재 공간을 확장하면 주어진 이미지와 더 가까운 일치를 찾는 동시에 잠재 표현이 없어야하는 임의의 이미지를 투사 할 수 있습니다.
대신 원래의 확장되지 않은 잠재 공간에서 잠재 코드를 찾는 데 집중합니다. 이는 생성기가 생성 할 수있는 이미지에 해당하기 때문입니다.
우리의 투영 방법은 두 가지면에서 이전 방법과 다릅니다.
첫째, 잠재 공간을보다 포괄적으로 탐색하기 위해 최적화 중에 잠재 코드에 감소 된 노이즈를 추가합니다.
둘째, StyleGAN 생성기의 확률 적 잡음 입력을 최적화하여 일관성있는 신호를 전달하지 않도록 정규화합니다.
정규화는 노이즈 맵의 자기 상관 계수를 적용하여 여러 스케일에 걸쳐 단위 가우스 노이즈의 계수와 일치하도록하는 것을 기반으로합니다.
프로젝션 방법에 대한 자세한 내용은 부록 D에서 확인할 수 있습니다.
5.1. Attribution of generated images 생성 된 이미지의 속성
Detection of manipulated or generated images is a very important task.
At present, classifier-based methods can quite reliably detect generated images, regardless of their exact origin [29, 45, 40, 51, 41].
However, given the rapid pace of progress in generative methods, this may not be a lasting situation.
Besides general detection of fake images, we may also consider a more limited form of the problem:being able to attribute a fake image to its specific source [2].
With StyleGAN, this amounts to checking if there exists a w ∈ W that re-synthesis the image in question.
We measure how well the projection succeeds by computing the LPIPS [50] distance between original and resynthesized image as DLPIPS[x, g(˜g−1(x))], where x is the image being analyzed and g˜−1 denotes the approximate projection operation. Figure 10 shows histograms of these distances for LSUN CAR and FFHQ datasets using the original StyleGAN and StyleGAN2, and Figure 9 shows example projections.
The images generated using StyleGAN2 can be projected into W so well that they can be almost unambiguously attributed to the generating network.
However, with the original StyleGAN, even though it should technically be possible to find a matching latent code, it appears that the mapping from W to images is too complex for this to succeed reliably in practice.
We find it encouraging that StyleGAN2 makes source attribution easier even though the image quality has improved significantly
조작되거나 생성 된 이미지를 감지하는 것은 매우 중요한 작업입니다.
현재 분류기 기반 방법은 정확한 출처에 관계없이 생성 된 이미지를 상당히 안정적으로 감지 할 수 있습니다 [29, 45, 40, 51, 41].
그러나 생성 방법의 빠른 진행 속도를 고려할 때 이것은 지속적인 상황이 아닐 수 있습니다.
가짜 이미지의 일반적인 탐지 외에도, 우리는 더 제한된 형태의 문제를 고려할 수 있습니다. 가짜 이미지를 특정 소스에 귀속시킬 수 있다는 것입니다 [2].
StyleGAN을 사용하면 문제의 이미지를 재 합성하는 w ∈ W가 있는지 확인하는 것과 같습니다.
원본 이미지와 재 합성 된 이미지 사이의 LPIPS [50] 거리를 DLPIPS [x, g (~ g-1 (x))]로 계산하여 투영 성공 여부를 측정합니다. 여기서 x는 분석중인 이미지이고 g ~ -1은 다음을 나타냅니다. 대략적인 투영 작업. 그림 10은 원래 StyleGAN 및 StyleGAN2를 사용하는 LSUN CAR 및 FFHQ 데이터 세트에 대한 이러한 거리의 히스토그램을 보여 주며, 그림 9는 예제 프로젝션을 보여줍니다.
StyleGAN2를 사용하여 생성 된 이미지는 W로 잘 투영 될 수 있으므로 생성 네트워크에 거의 모호하지 않게 기여할 수 있습니다.
그러나 원래 StyleGAN을 사용하면 기술적으로 일치하는 잠재 코드를 찾을 수 있어야하지만 W에서 이미지로의 매핑이 너무 복잡하여 실제로 안정적으로 성공할 수 없습니다.
StyleGAN2는 이미지 품질이 크게 향상 되었음에도 불구하고 소스 속성을 더 쉽게 만들 수 있다는 점이 고무적입니다.
6. Conclusions and future work 결론 및 향후 작업
We have identified and fixed several image quality issues in StyleGAN, improving the quality further and considerably advancing the state of the art in several datasets.
In some cases the improvements are more clearly seen in motion, as demonstrated in the accompanying video.
Appendix A includes further examples of results obtainable using our method.
Despite the improved quality, StyleGAN2 makes it easier to attribute a generated image to its source.
Training performance has also improved. At 10242 resolution, the original StyleGAN (config A in Table 1) trains at 37 images per second on NVIDIA DGX-1 with 8 Tesla V100 GPUs, while our config E trains 40% faster at 61 img/s.
Most of the speedup comes from simplified dataflow due to weight demodulation, lazy regularization, and code optimizations. StyleGAN2 (config F, larger networks) trains at 31 img/s, and is thus only slightly more expensive to train than original StyleGAN.
Its total training time was 9 days for FFHQ and 13 days for LSUN CAR.
The entire project, including all exploration, consumed 132 MWh of electricity, of which 0.68 MWh went into training the final FFHQ model.
In total, we used about 51 single-GPU years of computation (Volta class GPU).
A more detailed discussion is available in Appendix F.
In the future, it could be fruitful to study further improvements to the path length regularization, e.g., by replacing the pixel-space L2 distance with a data-driven feature-space metric.
Considering the practical deployment of GANs, we feel that it will be important to find new ways to reduce the training data requirements. This is especially crucial in applications where it is infeasible to acquire tens of thousands of training samples, and with datasets that include a lot of intrinsic variation.
StyleGAN에서 몇 가지 이미지 품질 문제를 확인하고 수정하여 품질을 더욱 향상시키고 여러 데이터 세트에서 최첨단 기술을 상당히 발전 시켰습니다.
일부 경우에는 첨부 된 비디오에서 보여 주듯이 개선 사항이보다 명확하게 작동합니다.
부록 A에는 당사의 방법을 사용하여 얻을 수있는 결과의 추가 예가 포함되어 있습니다.
향상된 품질에도 불구하고 StyleGAN2를 사용하면 생성 된 이미지를 소스에 더 쉽게 어트 리뷰 션 할 수 있습니다.
훈련 성능도 향상되었습니다. 10242 해상도에서 원래 StyleGAN (표 1의 구성 A)은 8 개의 Tesla V100 GPU를 사용하는 NVIDIA DGX-1에서 초당 37 개 이미지로 훈련하는 반면, 구성 E는 61img / s로 40 % 더 빠르게 훈련합니다.
대부분의 속도 향상은 가중치 복조, 지연 정규화 및 코드 최적화로 인한 단순화 된 데이터 흐름에서 비롯됩니다. StyleGAN2 (구성 F, 대규모 네트워크)는 31img / s로 학습하므로 원래 StyleGAN보다 학습하는 데 약간 더 비쌉니다.
총 교육 시간은 FFHQ 9 일, LSUN CAR 13 일이었습니다.
모든 탐사를 포함한 전체 프로젝트는 132 MWh의 전기를 소비했으며이 중 0.68 MWh는 최종 FFHQ 모델 훈련에 사용되었습니다.
총 51 년의 단일 GPU 계산 (Volta 클래스 GPU)을 사용했습니다.
자세한 내용은 부록 F에서 확인할 수 있습니다.
향후에는 픽셀 공간 L2 거리를 데이터 기반 기능 공간 메트릭으로 대체하여 경로 길이 정규화에 대한 추가 개선을 연구하는 것이 유익 할 수 있습니다.
GAN의 실제 배포를 고려할 때 훈련 데이터 요구 사항을 줄이는 새로운 방법을 찾는 것이 중요하다고 생각합니다. 이는 수만 개의 학습 샘플을 수집 할 수없는 애플리케이션과 많은 고유 변형이 포함 된 데이터 세트에서 특히 중요합니다.
A. Image quality 이미지 품질
We include several large images that illustrate various aspects related to image quality.
Figure 11 shows hand-picked examples illustrating the quality and diversity achievable using our method in FFHQ, while Figure 12 shows uncurated results for all datasets mentioned in the paper.
Figures 13 and 14 demonstrate cases where FID and P&R give non-intuitive results, but PPL seems to be more in line with human judgement.
We also include images relating to StyleGAN artifacts.
Figure 15 shows a rare case where the blob artifact fails to appear in StyleGAN activations, leading to a seriously broken image.
Figure 16 visualizes the activations inside Table 1 configurations A and F.
It is evident that progressive growing leads to higher-frequency content in the intermediate layers, compromising shift invariance of the network.
We hypothesize that this causes the observed uneven location preference for details when progressive growing is used.
이미지 품질과 관련된 다양한 측면을 보여주는 몇 가지 큰 이미지를 포함합니다.
그림 11은 FFHQ에서 우리의 방법을 사용하여 달성 할 수있는 품질과 다양성을 보여주는 엄선 된 예를 보여 주며, 그림 12는 백서에 언급 된 모든 데이터 세트에 대한 선별되지 않은 결과를 보여줍니다.
그림 13과 14는 FID와 P & R이 직관적이지 않은 결과를 제공하지만 PPL이 인간의 판단과 더 일치하는 경우를 보여줍니다.
또한 StyleGAN 인공물과 관련된 이미지도 포함됩니다.
그림 15는 StyleGAN 활성화에서 Blob 아티팩트가 나타나지 않아 이미지가 심각하게 손상되는 드문 경우를 보여줍니다.
그림 16은 표 1 구성 A 및 F 내부의 활성화를 시각화합니다.
점진적 성장은 중간 계층에서 더 높은 빈도의 콘텐츠로 이어져 네트워크의 이동 불변성을 손상시키는 것이 분명합니다.
우리는 이것이 점진적 성장이 사용될 때 세부 사항에 대해 관찰 된 고르지 않은 위치 선호를 유발한다고 가정합니다.
B. Implementation details
We implemented our techniques on top of the official TensorFlow implementation of StyleGAN5 corresponding to configuration A in Table 1. We kept most of the details unchanged, including the dimensionality of Z and W (512), mapping network architecture (8 fully connected layers, 100× lower learning rate), equalized learning rate for all trainable parameters [23], leaky ReLU activation with α = 0.2, bilinear filtering [49] in all up/downsampling layers [24], minibatch standard deviation layer at the end of the discriminator [23], exponential moving average of generator weights [23], style mixing regularization [24], nonsaturating logistic loss [16] with R1 regularization [30],Adam optimizer [25] with the same hyperparameters (β1 = 0, β2 = 0.99, = 10−8, minibatch = 32), and training datasets [24, 44]. We performed all training runs onNVIDIA DGX-1 with 8 Tesla V100 GPUs using TensorFlow 1.14.0 and cuDNN 7.4.2.
우리는 표 1의 구성 A에 해당하는 StyleGAN5의 공식 TensorFlow 구현 위에 기술을 구현했습니다. Z 및 W의 차원 (512), 매핑 네트워크 아키텍처 (8 개의 완전 연결 계층, 100 × 더 낮은 학습률), 모든 학습 가능한 매개 변수에 대한 균등화 된 학습률 [23], α = 0.2를 사용한 누수 ReLU 활성화, 모든 업 / 다운 샘플링 계층에서 이중 선형 필터링 [49] [24], 판별 기 끝의 미니 배치 표준 편차 계층 [23], 생성기 가중치의 지수 이동 평균 [23], 스타일 혼합 정규화 [24], R1 정규화를 사용한 비 포화 로지스틱 손실 [16] [30], 동일한 하이퍼 파라미터 (β1 = 0, β2 = 0.99, = 10-8, 미니 배치 = 32), 훈련 데이터 세트 [24, 44]. TensorFlow 1.14.0 및 cuDNN 7.4.2를 사용하여 Tesla V100 GPU 8 개를 사용하는 NVIDIA DGX-1에서 모든 교육 실행을 수행했습니다.
Generator redesign 생성기 재설계 구성
In configurations B–F we replace theoriginal StyleGAN generator with our revised aritecture.
In addition to the changes highlighted in Section 2, we initialize components of the constant input c1 using N (0, 1)and simplify the noise broadcast operations to use a single shared scaling factor for all feature maps.
Similar to Karras et al. [24], we initialize all weights using N (0, 1) and all biases and noise scaling factors to zero, except for the biases of the affine transformation layers, which we initialize to one.
We employ weight modulation and demodulation in all convolution layers, except for the output layers (tRGB in Figure 7) where we leave out the demodulation.
With 10242 output resolution, the generator contains a total of 18 affine transformation layers where the first one corresponds to 42 resolution, the next two correspond to 82, and so forth.
구성 B–F에서 원래 StyleGAN 생성기를 수정 된 구조로 대체합니다.
섹션 2에서 강조한 변경 사항 외에도 N (0, 1)을 사용하여 상수 입력 c1의 구성 요소를 초기화하고 모든 기능 맵에 대해 단일 공유 배율 인수를 사용하도록 잡음 브로드 캐스트 작업을 단순화합니다.
Karras et al. [24], N (0, 1)을 사용하여 모든 가중치를 초기화하고 1로 초기화하는 아핀 변환 계층의 바이어스를 제외하고 모든 바이어스 및 노이즈 스케일링 인자를 0으로 초기화합니다.
복조를 생략한 출력 계층 (그림 7의 tRGB)을 제외한 모든 컨볼 루션 계층에서 가중치 변조 및 복조를 사용합니다.
10242 출력 해상도를 사용하는 생성기는 총 18 개의 아핀 변환 레이어를 포함하며 첫 번째 것은 42 개의 해상도에 해당하고 다음 두 개는 82에 해당하는 식입니다.
Weight demodulation 가중치 demodulation
Considering the practical implementation of Equations 1 and 3, it is important to note that the resulting set of weights will be different for each sample in a minibatch, which rules out direct implementation using standard convolution primitives.
B–F에서 원래 StyleGAN 생성기를 수정 된 aritecture로 교체했습니다.
섹션 2에서 강조한 변경 사항 외에도 N (0, 1)을 사용하여 상수 입력 c1의 구성 요소를 초기화하고 모든 기능 맵에 대해 단일 공유 배율 인수를 사용하도록 노이즈 브로드 캐스트 작업을 단순화합니다.
Karras et al. [24], N (0, 1)을 사용하여 모든 가중치를 초기화하고 1로 초기화하는 아핀 변환 계층의 바이어스를 제외하고 모든 바이어스 및 노이즈 스케일링 인자를 0으로 초기화합니다.
복조를 생략 한 출력 계층 (그림 7의 tRGB)을 제외하고 모든 컨볼 루션 계층에서 가중치 변조 및 복조를 사용합니다.
10242 출력 해상도를 사용하는 생성기는 총 18 개의 아핀 변환 레이어를 포함하며 첫 번째 것은 42 개의 해상도에 해당하고 다음 두 개는 82에 해당하는 식입니다.
가중치 복조 방정식 1과 3의 실제 구현을 고려할 때 결과 가중치 집합은 미니 배치의 각 샘플마다 다르며 표준 컨볼 루션 프리미티브를 사용한 직접 구현을 배제한다는 점에 유의하는 것이 중요합니다.
Instead, we choose to employ grouped convolutions [26] that were originally proposed as a way to reduce computational costs by dividing the input feature maps into multiple independent groups, each with their own dedicated set of weights.
We implement Equations 1 and 3 by temporarily reshaping the weights and activations so that each convolution sees one sample with N groups — instead of N samples with one group.
This approach is highly efficient because the reshaping operations do not actually modify the contents of the weight and activation tensors.
대신, 우리는 입력 특성 맵을 각각 고유 한 가중치 집합이있는 여러 독립 그룹으로 나눔으로써 계산 비용을 줄이는 방법으로 원래 제안 된 그룹화 된 컨볼 루션 [26]을 사용하기로 선택합니다.
각 컨볼 루션이 하나의 그룹이있는 N 개의 샘플 대신 N 개의 그룹이있는 하나의 샘플을 볼 수 있도록 가중치와 활성화의 형태를 일시적으로 변경하여 방정식 1과 3을 구현합니다.
이 접근 방식은 재구성 작업이 가중치 및 활성화 텐서의 내용을 실제로 수정하지 않기 때문에 매우 효율적입니다.
Lazy regularization 지연 정규화
In configurations C–F we employ lazy regularization (Section 3.1) by evaluating the regularization terms (R1 and path length) in a separate regularization pass that we execute once every k training iterations.
We share the internal state of the Adam optimizer between the main loss and the regularization terms, so that the optimizer first sees gradients from the main loss for k iterations, followed by gradients from the regularization terms for one iteration.
To compensate for the fact that we now perform k+1 training iterations instead of k, we adjust the optimizer hyperparameters λ0 = c · λ, β01 = (β1)c, and β02 = (β2)c,where c = k/(k + 1). We also multiply the regularizationterm by k to balance the overall magnitude of its gradients.
We use k = 16 for the discriminator and k = 8 for the generator.
구성 C–F에서는 k 훈련 반복마다 한 번씩 실행하는 별도의 정규화 단계에서 정규화 항 (R1 및 경로 길이)을 평가하여 지연 정규화 (섹션 3.1)를 사용합니다.
우리는 Adam 최적화 기의 내부 상태를 주 손실과 정규화 항 사이에서 공유하므로 최적화 기는 먼저 k 반복에 대한 주 손실의 기울기를 확인한 다음 한 번의 반복에 대한 정규화 항의 기울기를 확인합니다.
이제 k 대신 k + 1 훈련 반복을 수행한다는 사실을 보상하기 위해 옵티 마이저 하이퍼 파라미터 λ0 = c · λ, β01 = (β1) c 및 β02 = (β2) c를 조정합니다. 여기서 c = k / ( k + 1). 또한 기울기의 전체 크기의 균형을 맞추기 위해 정규화 항에 k를 곱합니다.
판별기에 k = 16을 사용하고 생성기에 k = 8을 사용합니다.
Path length regularization 경로 길이 정규화
Configurations D–F include our new path length regularizer (Section 3.2).
We initialize the target scale a to zero and track it on a per-GPU basis as the exponential moving average of JTwy2 using decay coefficient βpl = 0.99.
We weight our regularization term by (5)
(5):
(5) where r specifies the output resolution (e.g. r = 1024).
We have found these parameter choices to work reliably across all configurations and datasets.
To ensure that our regularizer interacts correctly with style mixing regularization, we compute it as an average of all individual layers of the synthesis network.
Appendix C provides detailed analysis of the effects of our regularizer on the mapping between W and image space.
구성 D–F에는 새로운 경로 길이 정규화가 포함됩니다 (섹션 3.2).
목표 척도 a를 0으로 초기화하고 감쇠 계수 βpl = 0.99를 사용하여 JTwy2의 지수 이동 평균으로 GPU별로 추적합니다.
정규화 항에 (5) 가중치를 부여합니다.
(5) :
(5) 여기서 r은 출력 해상도를 지정합니다 (예 : r = 1024).
이러한 매개 변수 선택은 모든 구성 및 데이터 세트에서 안정적으로 작동하는 것으로 나타났습니다.
정규화가 스타일 혼합 정규화와 올바르게 상호 작용하는지 확인하기 위해 합성 네트워크의 모든 개별 레이어의 평균으로 계산합니다.
부록 C는 정규화 기가 W와 이미지 공간 간의 매핑에 미치는 영향에 대한 자세한 분석을 제공합니다.
Progressive growing 점진적 성장
In configurations A–D we use progressive growing with the same parameters as Karras et al. [24] (start at 82 resolution and learning rate λ =10−3, train for 600k images per resolution, fade in next resolution for 600k images, increase learning rate gradually by 3×).
In configurations E–F we disable progressive growing and set the learning rate to a fixed value λ = 2 · 10−3, which we found to provide the best results.
In addition, we use output skips in the generator and residual connections in the discriminator as detailed in Section 4.1.
구성 A ~ D에서는 Karras et al.과 동일한 매개 변수로 점진적 성장을 사용합니다. [24] (82 해상도 및 학습률 λ = 10-3에서 시작, 해상도 당 600k 이미지 학습, 600k 이미지에 대한 다음 해상도 페이드 인, 학습률 3 배 증가).
구성 E–F에서 점진적 성장을 비활성화하고 학습률을 고정 값 λ = 2 · 10−3으로 설정하여 최상의 결과를 제공합니다.
또한 4.1 절에 자세히 설명 된대로 생성기의 출력 스킵과 판별 기의 잔여 연결을 사용합니다.
Dataset-specific tuning 데이터 세트 별 튜닝
Similar to Karras et al. [24], we augment the FFHQ dataset with horizontal flips to effectively increase the number of training images from 70k to 140k, and we do not perform any augmentation for the LSUN datasets.
We have found that the optimal choices for the training length and R1 regularization weight γ tend to vary considerably between datasets and configurations.
We use γ = 10 for all training runs except for configuration E in Table 1, as well as LSUN CHURCH and LSUN HORSE in Table 3, where we use γ = 100. It is possible that further tuning of γ could provide additional benefits.
Karras et al. [24], 우리는 훈련 이미지의 수를 70k에서 140k로 효과적으로 늘리기 위해 수평 플립으로 FFHQ 데이터 세트를 증가 시켰으며 LSUN 데이터 세트에 대해서는 어떠한 증가도 수행하지 않습니다.
훈련 길이 및 R1 정규화 가중치 γ에 대한 최적의 선택은 데이터 세트와 구성간에 상당히 다른 경향이 있음을 발견했습니다.
γ = 100을 사용하는 표 3의 LSUN CHURCH 및 LSUN HORSE뿐만 아니라 표 1의 구성 E를 제외한 모든 훈련 실행에 γ = 10을 사용합니다. γ를 추가로 조정하면 추가 이점을 제공 할 수 있습니다.
Performance optimizations 성능 최적화
We profiled our training runs extensively and found that — in our case — the default primitives for image filtering, up/downsampling, bias addition, and leaky ReLU had surprisingly high overheads in terms of training time and GPU memory footprint.
This motivated us to optimize these operations using hand-written CUDA kernels. We implemented filtered up/downsampling as a single fused operation, and bias and activation as another one. In configuration E at 10242 resolution, our optimizations improved the overall training time by about 30% and memory footprint by about 20%.
우리는 훈련 실행을 광범위하게 프로파일 링 한 결과, 이미지 필터링, 업 / 다운 샘플링, 바이어스 추가 및 누수 ReLU에 대한 기본 프리미티브가 훈련 시간 및 GPU 메모리 풋 프린트 측면에서 놀랍도록 높은 오버 헤드를 가짐을 발견했습니다.
이것은 우리가 손으로 작성한 CUDA 커널을 사용하여 이러한 작업을 최적화하도록 동기를 부여했습니다. 필터링 된 업 / 다운 샘플링을 단일 융합 작업으로 구현하고 바이어스 및 활성화를 다른 작업으로 구현했습니다. 10242 해상도의 구성 E에서 최적화를 통해 전체 교육 시간이 약 30 %, 메모리 공간이 약 20 % 향상되었습니다.
C. Effects of path length regularization 경로 길이 정규화의 효과
The path length regularizer described in Section 3.2 is of the form: (6)
(6)
(6) where y ∈ RM is a unit normal distributed random variable in the space of generated images (of dimension M = 3wh, namely the RGB image dimensions), Jw ∈ RM×L is the Jacobian matrix of the generator function g : RL 7→ RM ata latent space point w ∈ RL, and a ∈ R is a global value that expresses the desired scale of the gradients.
섹션 3.2에 설명 된 경로 길이 정규화 형식은 다음과 같습니다. (6)
(6)
(6) 여기서 y ∈ RM은 생성 된 이미지 공간 (차원 M = 3wh, 즉 RGB 이미지 차원)의 단위 정규 분포 랜덤 변수이고, Jw ∈ RM × L은 생성기 함수 g의 야 코비 행렬입니다. g : RL 7 → RM at a latent space point w ∈ RL, a ∈ R is a global value that represents the desired scale of the gradients.
C.1. Effect on pointwise Jacobians 점별 야코비 행렬에 미치는 영향
The value of this prior is minimized when the inner expectation over y is minimized at every latent space point w separately. In this subsection, we show that the inner expectation is (approximately) minimized when the Jacobian matrix Jw is orthogonal, up to a global scaling factor.
The general strategy is to use the well-known fact that, in high dimensions L, the density of a unit normal distribution is concentrated on a spherical shell of radius √L.
The inner expectation is then minimized when the matrix JTw scales the function under expectation to have its minima at this radius.
This is achieved by any orthogonal matrix (with suitable global scale that is the same at every w).
We begin by considering the inner expectation LwL_w := E_y(||J_w^Ty||_2)^2
We first note that the radial symmetry of the distribution of y, as well as of the l2 norm, allows us to focus on diagonal matrices only.
This is seen using the Singular Value Decomposition JTw = UΣV˜ T, where U ∈ RL×L andV ∈ RM×M are orthogonal matrices, and Σ˜ = [Σ 0] is a horizontal concatenation of a diagonal matrix Σ ∈ RL×Land a zero matrix 0 ∈ RL×(M−L)[15].
Because rotating a unit normal random variable by an orthogonal matrix leaves the distribution unchanged, and rotating a vector leaves i norm unchanged, the expression simplifies to Lw.
이 사전 값은 y에 대한 내부 기대 값이 모든 잠재 공간 점 w에서 개별적으로 최소화 될 때 최소화됩니다. 이 하위 섹션에서는 Jacobian 행렬 Jw가 전역 배율 인수까지 직교 할 때 내부 기대 값이 (대략) 최소화됨을 보여줍니다.
일반적인 전략은 높은 차원 L에서 단위 정규 분포의 밀도가 반경 √L의 구형 쉘에 집중된다는 잘 알려진 사실을 사용하는 것입니다.
그런 다음 행렬 JTw가이 반경에서 최소값을 가질 것으로 예상되는 함수를 확장 할 때 내부 기대 값이 최소화됩니다.
이것은 모든 직교 행렬에 의해 달성됩니다 (모든 w에서 동일한 적절한 글로벌 스케일 사용).
우리는 내적 기대 LwL_w를 고려하여 시작합니다 : = E_y (|| J_w ^ Ty || _2) ^ 2
우리는 먼저 l2 노름뿐만 아니라 y 분포의 방사형 대칭을 통해 대각선 행렬에만 집중할 수 있습니다.
이것은 특이 값 분해 JTw = UΣV ~ T를 사용하여 볼 수 있습니다. 여기서 U ∈ RL × L 및 V ∈ RM × M은 직교 행렬이고 Σ ~ = [Σ 0]은 대각선 행렬 Σ ∈ RL × Land의 수평 연결입니다. 제로 행렬 0 ∈ RL × (M-L) [15].
단위 정규 랜덤 변수를 직교 행렬로 회전하면 분포가 변경되지 않고 벡터를 회전하면 i 노름이 변경되지 않으므로 표현식은 Lw로 단순화됩니다.
Furthermore, the zero matrix in Σ˜ drops the dimensions of y beyond L, effectively marginalizing its distribution over those dimensions.
The marginalized distribution is again a unit normal distribution over the remaining L dimensions.
We are then left to consider the minimization of the expression Lw, over diagonal square matrices Σ ∈ R L×L, where y˜ is unit normal distributed in dimension L.
To summarize, all matrices JTw that share the same singular values with Σ produce the same value for the original loss.
Next, we show that this expression is minimized when the diagonal matrix Σ has a specific identical value at every diagonal entry, i.e., it is a constant multiple of an identity matrix.
We first write the expectation as an integral over the probability density of y˜:Lw=Integral
또한 Σ ~의 제로 행렬은 L을 넘어서 y의 차원을 떨어 뜨려 해당 차원에 대한 분포를 효과적으로 주 변화합니다.
소외 분포는 나머지 L 차원에 대한 단위 정규 분포입니다.
그런 다음 대각 정사각형 행렬 Σ ∈ R L × L에 대한 표현 Lw의 최소화를 고려합니다. 여기서 y ~는 차원 L에 분포 된 단위 정규화입니다.
요약하면, Σ와 동일한 특이 값을 공유하는 모든 행렬 JTw는 원래 손실에 대해 동일한 값을 생성합니다.
다음으로, 대각 행렬 Σ가 모든 대각 항목에서 특정 동일한 값을 가질 때, 즉 단위 행렬의 상수 배수 일 때이식이 최소화됨을 보여줍니다.
먼저 y ~ : Lw = Integral의 확률 밀도에 대한 적분으로 기대 값을 작성합니다.
Observing the radially symmetric form of the density, we change into a polar coordinates y˜ = rφ, where r ∈ R+ is the distance from origin, and φ ∈ SL−1 is a unit vector, i.e., a point on the L − 1-dimensional unit sphere.
This change of variables introduces a Jacobian factor r{L−1}:
L˜w = (2π)− L2ZSZ ∞0(r kΣφk2 − a)2rL−1exp −r22dr dφThe probability density (2π)−L/2rL−1exp −r22
is then an L-dimensional unit normal density expressed in polar coordinates, dependent only on the radius and not on the angle.
A standard argument by Taylor approximation shows that when L is high, for any φ the density is well approximated by density (2πe/L)−L/2exp−12(r − µ)2/σ2, which is a (unnormalized) one-dimensional normal density in r, centered at µ =√L of standard deviation σ = 1/√2[4].
In other words, the density of the L-dimensional unit normal distribution is concentrated on a shell of radius √L.
Substituting this density into the integral, the loss becomes approximately Lw ≈ (2πe/L) −L/2ZSZ ∞0(r kΣφk2 − a)2exp−r −√L22σ2dr dφ, (7)
where the approximation becomes exact in the limit of infinite dimension L.
방사상 대칭 형태의 밀도를 관찰하여 극좌표 y ~ = rφ로 변경합니다. 여기서 r ∈ R +는 원점으로부터의 거리이고 φ ∈ SL-1은 단위 벡터, 즉 L-1상의 점입니다. 차원 단위 구.
이러한 변수 변경은 야 코비 인자 r {L−1}을 도입합니다.
L ~ w = (2π) − L2ZSZ ∞0 (r kΣφk2 − a) 2rL−1exp −r22 dr dφ 확률 밀도 (2π) −L / 2rL−1exp −r22
그런 다음 극좌표로 표현되는 L 차원 단위 법선 밀도이며 각도가 아닌 반경에만 의존합니다.
Taylor 근사에 의한 표준 인수는 L이 높을 때 φ에 대해 밀도가 밀도 (2πe / L) −L / 2exp−12 (r − µ) 2 / σ2에 의해 잘 근사된다는 것을 보여줍니다. r 단위의 1 차원 정규 밀도는 표준 편차 σ = 1 / √2 [4]의 µ = √L에 중심을 둡니다.
즉, L 차원 단위 정규 분포의 밀도는 반경 √L의 껍질에 집중되어 있습니다.
이 밀도를 적분으로 대체하면 손실은 대략 Lw ≈ (2πe / L) −L / 2ZSZ ∞0 (r kΣφk2 − a) 2exp− r −√L 22σ2dr dφ, (7)
근사는 무한 차원 L의 한계에서 정확 해집니다.
To minimize this loss, we set Σ such that the function(r kΣφk2 − a)2 obtains minimal values on the spherical shell of radius √L.
This is achieved by Σ = √aLI, whereby the function becomes constant in φ and the expression reduces to Lw ≈ (2πe/L)−L/2A(S)a2L−1Z ∞0r −√L2exp−r −√L22σ2dr,
where A(S) is the surface area of the unit sphere (and like the other constant factors, irrelevant for minimization).
Note that the zero of the parabola (r −√L)2 coincides with the maximum of the probability density, and therefore this choice of Σ minimizes the inner integral in Eq. 7 separately for every φ.
In summary, we have shown that — assuming a high dimensionality L of the latent space — the value of the path length prior (Eq. 6) is minimized when all singular values of the Jacobian matrix of the generator are equal to a global constant, at every latent space point w, i.e., they are orthogonal up to a globally constant scale.
While in theory a merely scales the values of the mapping without changing its properties and could be set to a fixed value (e.g., 1), in practice it does affect the dynamics of the training.
If the imposed scale does not match the scale induced by the random initialization of the network, the training spends its critical early steps in pushing the weights towards the required overall magnitudes, rather than enforcing the actual objective of interest.
This may degrade the internal state of the network weights and lead to sub-optimal performance in later training.
Empirically we find that setting a fixed scale reduces the consistency of the training results across training runs and datasets.
Instead, we set a dynamically based on a running average of the existing scale of the Jacobians, namely a ≈ Ew,yJTwy2.
이 손실을 최소화하기 위해 함수 (r kΣφk2 − a) 2가 반경 √L의 구형 쉘에서 최소값을 얻도록 Σ를 설정합니다.
이것은 Σ = √aLI에 의해 달성되며, 함수는 φ에서 일정하게되고 식은 Lw ≈ (2πe / L) −L / 2A (S) a2L−1Z ∞0 r −√L 2exp − r −√L 22σ2dr,
여기서 A (S)는 단위 구의 표면적입니다 (및 최소화와 관련이없는 다른 상수 인자와 마찬가지로).
포물선 (r −√L) 2의 0은 확률 밀도의 최대 값과 일치하므로이 Σ 선택은 Eq의 내부 적분을 최소화합니다. 모든 φ에 대해 7 개.
요약하면, 잠복 공간의 높은 차원 성 L을 가정 할 때 생성기의 야 코비 행렬의 모든 특이 값이 전역 상수와 같을 때 경로 길이 이전 (식 6)의 값이 최소화된다는 것을 보여주었습니다. 모든 잠재 공간 점 w에서, 즉, 그들은 전 세계적으로 일정한 척도까지 직교합니다.
이론적으로는 속성을 변경하지 않고 매핑 값의 크기를 조정하고 고정 된 값 (예 : 1)으로 설정할 수 있지만 실제로는 훈련의 역학에 영향을줍니다.
부과 된 척도가 네트워크의 무작위 초기화에 의해 유도 된 척도와 일치하지 않는 경우, 훈련은 실제 관심 목표를 시행하는 대신 가중치를 필요한 전체 규모로 밀기 위해 중요한 초기 단계를 소비합니다.
이로 인해 네트워크 가중치의 내부 상태가 저하되고 이후 학습에서 최적이 아닌 성능으로 이어질 수 있습니다.
경험적으로 우리는 고정 척도를 설정하면 훈련 실행 및 데이터 세트에서 훈련 결과의 일관성이 감소한다는 것을 발견했습니다.
대신 Jacobians의 기존 척도의 실행 평균, 즉 ≈ Ew, yJTwy2를 기반으로 동적으로 설정합니다.
With this choice the prior targets the scale of the local Jacobians towards whatever global average already exists, rather than forcing a specific global average.
This also eliminates the need to measure the appropriate scale of the Jacobians explicitly, as is done by Odena et al. [33] who consider a related conditioning prior.
Figure 17 shows empirically measured magnitudes of singular values of the Jacobian matrix for networks trained with and without path length regularization.
While orthogonality is not reached, the eigenvalues of the regularized network are closer to one another, implying better conditioning, with the strength of the effect correlated with the PPL metric (Table 1).
이 선택을 통해 이전은 특정 글로벌 평균을 강요하는 대신 이미 존재하는 글로벌 평균에 대한 로컬 Jacobians의 규모를 목표로합니다.
이것은 또한 Odena et al.에 의해 수행 된 것처럼 Jacobians의 적절한 척도를 명시 적으로 측정 할 필요성을 제거합니다. [33] 관련 조건화를 사전에 고려하는 사람.
그림 17은 경로 길이 정규화를 사용하거나 사용하지 않고 훈련 된 네트워크에 대해 경험적으로 측정 된 Jacobian 행렬의 특이 값 크기를 보여줍니다.
직교성에 도달하지 않는 동안 정규화 된 네트워크의 고유 값은 서로 더 가까워 PPL 메트릭과 상관 관계가있는 효과의 강도와 함께 더 나은 컨디셔닝을 의미합니다 (표 1).
C.2. Effect on global properties of generator mapping 생성기 매핑의 전역 속성에 미치는 영향
In the previous subsection, we found that the prior encourages the Jacobians of the generator mapping to be everywhere orthogonal.
While Figure 17 shows that the mapping does not satisfy this constraint exactly in practice, it is instructive to consider what global properties the constraint implies for mappings that do.
Without loss of generality, we assume unit global scale for the matrices to simplify the presentation.
The key property is that that a mapping g : RL 7→ RMwith everywhere orthogonal Jacobians preserves the lengthsof curves.
To see this, let u : [t0, t1] 7→ RL parametrize a curve in the latent space.
Mapping the curve through the generator g, we obtain a curve u˜ = g ◦ u in the space of images.
Its arc length is L = Z t1 t0|u˜0(t)| dt, (8)
(8):
(8) where prime denotes derivative with respect to t.
By chain rule, this equals L = Z t1 t0 |Jg(u(t))u 0 (t)| dt, (9) where Jg ∈ R L×M is the Jacobian matrix of g evaluated at u(t).
By our assumption, the Jacobian is orthogonal, an consequently it leaves the 2-norm of the vector u0(t) unaffected:
L =Z t1t0|u0(t)| dt. (10)
속성에 미치는 영향
이전 하위 섹션에서 우리는 이전 버전이 생성기 매핑의 야 코비 행렬이 모든 곳에서 직교하도록 장려한다는 것을 발견했습니다.
그림 17은 매핑이 실제로이 제약 조건을 정확히 충족하지 않음을 보여 주지만 제약 조건이 매핑에 대해 의미하는 전역 속성을 고려하는 것은 유익합니다.
일반성을 잃지 않고 표현을 단순화하기 위해 행렬에 대한 단위 전역 척도를 가정합니다.
핵심 속성은 모든 직교 야 코비 행렬이있는 매핑 g : RL 7 → RM이 곡선의 길이를 보존한다는 것입니다.
이것을보기 위해 u : [t0, t1] 7 → RL은 잠재 공간에서 곡선을 매개 변수화합니다.
생성기 g를 통해 곡선을 매핑하여 이미지 공간에서 u ~ = g ◦ u 곡선을 얻습니다.
호 길이는 L = Z t1 t0 | u ~ 0 (t) | dt, (8)
(8) :
(8) 여기서 프라임은 t에 대한 미분을 나타냅니다.
연쇄 규칙에 따라 L = Z t1 t0 | Jg (u (t)) u 0 (t) | dt, (9) 여기서 Jg ∈ R LxM은 u (t)에서 평가 된 g의 야 코비 행렬입니다.
우리의 가정에 따르면 Jacobian은 직교하므로 벡터 u0 (t)의 2- 노름은 영향을받지 않습니다.
L = Z t1t0 | u0 (t) | dt. (10)
This is the length of the curve u in the latent space, prior to mapping with g. Hence, the lengths of u and u˜ are equal, and so g preserves the length of any curve.
In the language of differential geometry, g isometrically embeds the Euclidean latent space RL into a submanifold M in RM — e.g., the manifold of images representing faces, embedded within the space of all possible RGB images.
A consequence of isometry is that straight line segments in the latent space are mapped to geodesics, or shortest paths, on the image manifold: a straight line v that connects two latent space points cannot be made any shorter, so neither can there be a shorter on-manifold image-space path between the corresponding images than g ◦ v.
For example, a geodesic on the manifold of face images is a continuous morph between two faces that incurs the minimum total amount of change (as measured by l2 difference in RGB space) when one sums up the image difference in each step of the morph.
Isometry is not achieved in practice, as demonstrated in empirical experiments in the previous subsection.
The full loss function of the training is a combination of potentially conflicting criteria, and it is not clear if a genuinely isometric mapping would be capable of expressing the image manifold of interest.
Nevertheless, a pressure to make the mapping as isometric as possible has desirable consequences.
In particular, it discourages unnecessary “detours”: in a nonconstrained generator mapping, a latent space interpolation between two similar images may pass through any number of distant images in RGB space.
With regularization, the mapping is encouraged to place distant images in different regions of the latent space, so as to obtain short image paths between any two endpoints.
이것은 g로 매핑하기 전에 잠재 공간에서 곡선 u의 길이입니다. 따라서 u와 u ~의 길이는 같으므로 g는 모든 곡선의 길이를 유지합니다.
미분 기하학의 언어에서 g는 유클리드 잠복 공간 RL을 RM의 서브 다양체 M (예 : 모든 가능한 RGB 이미지의 공간 내에 포함 된 얼굴을 나타내는 이미지의 다양체)에 등각 적으로 삽입합니다.
등거리 변환의 결과는 잠재 공간의 직선 세그먼트가 이미지 매니 폴드의 측지선 또는 최단 경로에 매핑된다는 것입니다. 두 개의 잠재 공간 점을 연결하는 직선 v는 더 짧게 만들 수 없으므로 더 짧게 만들 수 없습니다. g ◦ v보다 해당 이미지 간의 on-manifold 이미지 공간 경로.
예를 들어 다양한 얼굴 이미지의 측지선은 모프의 각 단계에서 이미지 차이를 합산 할 때 최소 총 변화량 (RGB 공간의 l2 차이로 측정)을 발생시키는 두면 사이의 연속 모프입니다.
Isometry는 이전 하위 섹션의 경험적 실험에서 입증 된 것처럼 실제로 달성되지 않습니다.
훈련의 전체 손실 함수는 잠재적으로 상충되는 기준의 조합이며, 진정한 등각 매핑이 관심있는 다양한 이미지를 표현할 수 있는지 여부는 명확하지 않습니다.
그럼에도 불구하고 매핑을 가능한 한 아이소 메트릭으로 만들라는 압력은 바람직한 결과를 가져옵니다.
특히 불필요한 "우회"를 방지합니다. 제약없는 생성기 매핑에서 두 개의 유사한 이미지 사이의 잠재 공간 보간은 RGB 공간에서 원하는 수의 멀리있는 이미지를 통과 할 수 있습니다.
정규화를 사용하면 두 끝점 사이의 짧은 이미지 경로를 얻기 위해 잠복 공간의 다른 영역에 먼 이미지를 배치하도록 매핑이 권장됩니다.
D. Projection method details 프로젝션 방법 세부 사항
Given a target image x, we seek to find the corresponding w ∈ W and per-layer noise maps denoted ni ∈ R ri×ri where i is the layer index and ri denotes the resolution of the ith noise map.
The baseline StyleGAN generator in 1024×1024 resolution has 18 noise inputs, i.e., two for each resolution from 4×4 to 1024×1024 pixels.
Our improved architecture has one fewer noise input because we do not add noise to the learned 4×4 constant (Figure 2).
Before optimization, we compute µw = Ez f(z) by running 10 000 random latent codes z through the mapping network f.
We also approximate the scale of W by computing σ2w = Ez kf(z) − µwk22, i.e., the average square Euclideandistance to the center.
At the beginning of optimization, we initialize w = µw and ni = N (0, I) for all i.
The trainable parameters are the components of w as well as all components in all noise maps ni.
The optimization is run for 1000 iterations using Adam optimizer [25] with default parameters.
대상 이미지 x가 주어지면 해당하는 w ∈ W 및 ni ∈ R rixri로 표시된 레이어 별 노이즈 맵을 찾습니다. 여기서 i는 레이어 인덱스이고 ri는 i 번째 노이즈 맵의 해상도를 나타냅니다.
1024x1024 해상도의 기준 StyleGAN 생성기에는 18 개의 노이즈 입력이 있습니다. 즉, 4x4에서 1024x1024 픽셀의 각 해상도에 대해 2 개입니다.
개선 된 아키텍처는 학습 된 4x4 상수에 노이즈를 추가하지 않기 때문에 노이즈 입력이 하나 더 적습니다 (그림 2).
최적화 전에 매핑 네트워크 f를 통해 10,000 개의 임의 잠복 코드 z를 실행하여 µw = Ez f (z)를 계산합니다.
우리는 또한 σ2w = Ez kf (z) − µwk22, 즉 중심에 대한 평균 제곱 Euclideandistance를 계산하여 W의 척도를 근사합니다.
최적화를 시작할 때 모든 i에 대해 w = µw 및 ni = N (0, I)을 초기화합니다.
학습 가능한 매개 변수는 w의 구성 요소와 모든 노이즈 맵 ni의 모든 구성 요소입니다.
최적화는 기본 매개 변수와 함께 Adam Optimizer [25]를 사용하여 1000 회 반복 실행됩니다.
Maximum learning rate is λmax = 0.1, and it is ramped up from zero linearly during the first 50 iterations and ramped down to zero using a cosine schedule during the last 250 iterations.
In the first three quarters of the optimization we add Gaussian noise to w when evaluating the loss function as ˜w = w + N (0, 0.05 σwt2), where t goes from one to zero during the first 750 iterations.
This adds stochasticity to the optimization and stabilizes finding of the global optimum.
Given that we are explicitly optimizing the noise maps, we must be careful to avoid the optimization from sneaking actual signal into them.
Thus we include several noise map regularization terms in our loss function, in addition to an image quality term.
The image quality term is the LPIPS [50] distance between target image x and the synthesized image: Limage = DLPIPS[x, g(˜w, n0, n1, . . .)].
For increased performance and stability, we downsample both images to 256×256 resolution before computing the LPIPS distance.
Regularization of the noise maps is performed on multiple resolution scales.
For this purpose, we form for each noise map greater than 8×8 in size a pyramid down to 8×8 resolution by averaging 2×2 pixel neighborhoods and multiplying by 2 at each step to retain the expected unit variance.
최대 학습률은 λmax = 0.1이며, 처음 50 회 반복 동안 선형 적으로 0에서 증가하고 마지막 250 회 반복 동안 코사인 일정을 사용하여 0으로 감소합니다.
최적화의 처음 3 분기에서 손실 함수를 ~ w = w + N (0, 0.05 σwt2)으로 평가할 때 w에 가우스 노이즈를 추가합니다. 여기서 t는 처음 750 회 반복 동안 1에서 0으로 이동합니다.
이것은 최적화에 확률 성을 추가하고 글로벌 최적의 발견을 안정화시킵니다.
우리가 노이즈 맵을 명시 적으로 최적화하고 있다는 점을 감안할 때, 최적화가 실제 신호를 노이즈 맵으로 몰래 들어 가지 않도록주의해야합니다.
따라서 손실 함수에는 이미지 품질 용어와 함께 몇 가지 노이즈 맵 정규화 용어가 포함됩니다.
이미지 품질 용어는 목표 이미지 x와 합성 이미지 사이의 LPIPS [50] 거리입니다 : Limage = DLPIPS [x, g (~ w, n0, n1,...)].
성능과 안정성을 높이기 위해 LPIPS 거리를 계산하기 전에 두 이미지를 256x256 해상도로 다운 샘플링합니다.
노이즈 맵의 정규화는 여러 해상도 스케일에서 수행됩니다.
이를 위해 2x2 픽셀 이웃을 평균화하고 각 단계에서 2를 곱하여 예상 단위 분산을 유지하여 8x8 크기보다 큰 각 노이즈 맵에 대해 피라미드를 8x8 해상도로 축소합니다.
These downsampled noise maps are used for regularization only and have no part in synthesis.
Let us denote the original noise maps by ni,0 = ni and the downsampled versions by ni,j>0.
Similarly, let ri,j be the resolution of an original (j = 0) or downsampled (j >0) noise map so that ri,j+1 = ri,j/2.
The regularization term for noise map ni,j is then Li,j =1r2i,j·Xx,yni,j (x, y) · ni,j (x − 1, y)!2+1r2i,j·Xx,yni,j (x, y) · ni,j (x, y − 1)!2, where the noise map is considered to wrap at the edges.
The regularization term is thus sum of squares of the resolutionnormalized autocorrelation coefficients at one pixel shifts horizontally and vertically, which should be zero for a normally distributed signal.
The overall loss term is then Ltotal = Limage + αPi,j Li,j.
In all our tests, we have used noise regularization weight α = 105.
In addition, we renormalize all noise maps to zero mean and unit variance after each optimization step.
Figure 18 illustrates the effect of noise regularization on the resulting noise maps.
이러한 다운 샘플링 된 노이즈 맵은 정규화에만 사용되며 합성에는 포함되지 않습니다.
원래 노이즈 맵을 ni, 0 = ni로 표시하고 다운 샘플링 된 버전을 ni, j> 0으로 표시해 보겠습니다.
마찬가지로, ri, j를 원본 (j = 0) 또는 다운 샘플링 된 (j> 0) 노이즈 맵의 해상도라고하여 ri, j + 1 = ri, j / 2가되도록합니다.
노이즈 맵 ni, j에 대한 정규화 항은 Li, j = 1r2i, j · Xx, yni, j (x, y) · ni, j (x-1, y)! 2 + 1r2i, j · Xx, yni입니다. , j (x, y) · ni, j (x, y − 1)! 2, 여기서 노이즈 맵은 가장자리를 감싸는 것으로 간주됩니다.
따라서 정규화 항은 한 픽셀에서 수평 및 수직으로 이동하는 해상도 정규화 된 자기 상관 계수의 제곱의 합이며, 정규 분포 신호의 경우 0이어야합니다.
전체 손실 항은 Ltotal = Limage + αPi, j Li, j입니다.
모든 테스트에서 노이즈 정규화 가중치 α = 105를 사용했습니다.
또한 각 최적화 단계 후에 모든 노이즈 맵을 0 평균 및 단위 분산으로 재 정규화합니다.
그림 18은 결과 노이즈 맵에 대한 노이즈 정규화의 효과를 보여줍니다.
E. Results with spectral normalization 스펙트럼 정규화 결과
Since spectral normalization (SN) is widely used in GANs [31], we investigated its effect on StyleGAN2.
Table 4 gives the results for a variety of configurations where spectral normalization is enabled in addition to our techniques (weight demodulation, path length regularization) or instead of them.
Interestingly, adding spectral normalization to our generator is almost a no-op.
On an implementation level, SN scales the weight tensor of each layer with a scalar value 1/σ(w).
The effect of such scaling, however, is overridden by Equation 3 for the main convolutional layers as well as the affine transformation layers.
Thus, the only thing that SN adds on top of weight demodulation is through its effect on the tRGB layers.
When we enable spectral normalization in the discriminator, FID is slightly compromised.
Enabling it in the generator as well leads to significantly worse results, even though its effect is isolated to the tRGB layers.
Leaving SN enabled, but disabling a subset of our contributions does not improve the situation.
Thus we conclude that StyleGAN2 gives better results without spectral normalization.
스펙트럼 정규화 (SN)는 GAN [31]에서 널리 사용되기 때문에 StyleGAN2에 미치는 영향을 조사했습니다.
표 4는 당사의 기술 (가중 복조, 경로 길이 정규화)에 추가로 또는 그 대신에 스펙트럼 정규화가 활성화 된 다양한 구성에 대한 결과를 제공합니다.
흥미롭게도 생성기에 스펙트럼 정규화를 추가하는 것은 거의 작동하지 않습니다.
구현 수준에서 SN은 스칼라 값 1 / σ (w)를 사용하여 각 계층의 가중치 텐서를 확장합니다.
그러나 이러한 스케일링의 효과는 주요 컨볼 루션 레이어와 아핀 변환 레이어에 대한 수식 3에 의해 무시됩니다.
따라서 SN이 가중치 복조에 추가하는 유일한 것은 tRGB 레이어에 미치는 영향입니다.
판별 기에서 스펙트럼 정규화를 활성화하면 FID가 약간 손상됩니다.
생성기에서도 활성화하면 효과가 tRGB 레이어로 분리되어 있어도 결과가 훨씬 더 나빠집니다.
SN을 활성화 된 상태로 두지 만 일부 기여를 비활성화해도 상황이 개선되지는 않습니다.
따라서 StyleGAN2가 스펙트럼 정규화없이 더 나은 결과를 제공한다는 결론을 내립니다.
F. Energy consumption 에너지 소비
Computation is a core resource in any machine learning project: its availability and cost, as well as the associated energy consumption, are key factors in both choosing research directions and practical adoption.
We provide a detailed breakdown for our entire project in Table 5 in terms of both GPU time and electricity consumption.
We report expended computational effort as single-GPU years (Volta class GPU).
We used a varying number of NVIDIA DGX-1s for different stages of the project, and converted each run to single-GPU equivalents by simply scaling by the number of GPUs used.
The entire project consumed approximately 131.61 megawatt hours (MWh) of electricity.
We followed the Green500 power measurements guidelines [11] as follows.
For each job, we logged the exact duration, number of GPUs used, and which of our two separate compute clusters the job was executed on.
We then measured the actual power draw of an 8-GPU DGX-1 when it was training FFHQ config F.
A separate estimate was obtained for the two clusters because they use different DGX-1 SKUs.
컴퓨팅은 모든 머신 러닝 프로젝트의 핵심 리소스입니다.
가용성과 비용, 관련 에너지 소비는 연구 방향을 선택하고 실제 채택하는데 있어 핵심 요소입니다.
우리는 GPU 시간과 전력 소비 측면에서 전체 프로젝트에 대한 자세한 분석을 표 5에 제공합니다.
우리는 소모된 계산 노력을 단일 GPU 연도 (Volta 클래스 GPU)로 보고합니다.
우리는 프로젝트의 여러 단계에 대해 다양한 수의 NVIDIA DGX-1을 사용했으며 사용 된 GPU 수만큼 간단히 확장하여 각 실행을 단일 GPU에 상응하는 것으로 변환했습니다.
전체 프로젝트는 약 131.61MWh의 전기를 소비했습니다.
다음과 같이 Green500 전력 측정 지침 [11]을 따랐습니다.
각 작업에 대해 정확한 기간, 사용 된 GPU 수, 작업이 실행 된 두 개의 개별 컴퓨팅 클러스터 중 어떤 것을 기록했습니다.
그런 다음 FFHQ 구성 F를 훈련 할 때 8-GPU DGX-1의 실제 전력 소비량을 측정했습니다.
서로 다른 DGX-1 SKU를 사용하기 때문에 두 클러스터에 대해 별도의 추정치를 얻었습니다.
The vast majority of our training runs used 8 GPUs, and for the rest we approximated the power draw by scaling linearly with n/8, where n is the number of GPUs.
Approximately half of the total energy was spent on early exploration and forming ideas.
Then subsequently a quarter was spent on refining those ideas in more targeted experiments, and finally a quarter on producing this paper and preparing the public release of code, trained models,and large sets of images.
Training a single FFHQ network (config F) took approximately 0.68 MWh (0.5% of the total project expenditure).
This is the cost that one would pay when training the network from scratch, possibly using a different dataset.
In short, vast majority of the electricity used went into shaping the ideas, testing hypotheses, and hyperparameter tuning. We did not use automated tools for finding hyperparameters or optimizing network architectures.
훈련 실행의 대부분은 8 개의 GPU를 사용했으며 나머지는 n / 8 (n은 GPU 수)로 선형 확장하여 전력 소비량을 대략적으로 계산했습니다.
전체 에너지의 약 절반이 초기 탐색 및 아이디어 형성에 사용되었습니다.
그런 다음 1/4은 보다 구체적인 실험에서 이러한 아이디어를 구체화하는 데 사용되었으며, 마지막으로 1/4은이 문서를 작성하고 코드, 훈련 된 모델 및 대규모 이미지 세트의 공개 릴리스를 준비하는 데 사용되었습니다.
단일 FFHQ 네트워크 (구성 F) 훈련에는 약 0.68 MWh (총 프로젝트 지출의 0.5 %)가 소요되었습니다.
이것은 아마도 다른 데이터 세트를 사용하여 네트워크를 처음부터 훈련시킬 때 지불하는 비용입니다.
요컨대, 사용 된 전기의 대부분은 아이디어 형성, 가설 테스트 및 하이퍼 파라미터 튜닝에 사용되었습니다.
하이퍼 파라미터를 찾거나 네트워크 아키텍처를 최적화하기 위해 자동화된 도구를 사용하지 않았습니다.
'비지도학습 > GAN' 카테고리의 다른 글
PGGAN(2019) (0) | 2021.03.11 |
---|---|
[논문]StyleGAN,2019 (0) | 2021.03.10 |
A Style-Based Generator Architecture for Generative Adversarial Networks, 2019(버전 1) (0) | 2021.03.02 |
[논문]DiscoFaceGAN,2020 (0) | 2021.02.25 |
Patch-Based Image Inpainting with Generative Adversarial Networks,2018 (0) | 2021.02.18 |