<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ep-patent-document PUBLIC "-//EPO//EP PATENT DOCUMENT 1.7.1//EN" "ep-patent-document-v1-7-1.dtd">
<!-- This XML data has been generated under the supervision of the European Patent Office -->
<ep-patent-document id="EP22871916B1" file="EP22871916NWB1.xml" lang="en" country="EP" doc-number="4339836" kind="B1" date-publ="20260513" status="n" dtd-version="ep-patent-document-v1-7-1">
<SDOBI lang="en"><B000><eptags><B001EP>ATBECHDEDKESFRGBGRITLILUNLSEMCPTIESILTLVFIROMKCYALTRBGCZEEHUPLSK..HRIS..MTNORS..SM..................</B001EP><B005EP>J</B005EP><B007EP>0009210-RPUB02</B007EP></eptags></B000><B100><B110>4339836</B110><B120><B121>EUROPEAN PATENT SPECIFICATION</B121></B120><B130>B1</B130><B140><date>20260513</date></B140><B190>EP</B190></B100><B200><B210>22871916.7</B210><B220><date>20220919</date></B220><B240><B241><date>20231214</date></B241><B242><date>20250624</date></B242></B240><B250>zh</B250><B251EP>en</B251EP><B260>en</B260></B200><B300><B310>202111122307</B310><B320><date>20210924</date></B320><B330><ctry>CN</ctry></B330></B300><B400><B405><date>20260513</date><bnum>202620</bnum></B405><B430><date>20240320</date><bnum>202412</bnum></B430><B450><date>20260513</date><bnum>202620</bnum></B450><B452EP><date>20251203</date></B452EP></B400><B500><B510EP><classification-ipcr sequence="1"><text>G06N   3/0464      20230101AFI20251126BHEP        </text></classification-ipcr><classification-ipcr sequence="2"><text>G06N   3/0475      20230101ALI20251126BHEP        </text></classification-ipcr><classification-ipcr sequence="3"><text>G06N   3/045       20230101ALI20251126BHEP        </text></classification-ipcr><classification-ipcr sequence="4"><text>G06N   3/088       20230101ALI20251126BHEP        </text></classification-ipcr></B510EP><B520EP><classifications-cpc><classification-cpc sequence="1"><text>G06N   3/045       20230101 FI20240419BHEP        </text></classification-cpc><classification-cpc sequence="2"><text>G06N   3/088       20130101 LI20240419BGEP        </text></classification-cpc><classification-cpc sequence="3"><text>G06N   3/0475      20230101 LI20240928BHEP        </text></classification-cpc><classification-cpc sequence="4"><text>G06N   3/0464      20230101 LI20241031BHEP        </text></classification-cpc></classifications-cpc></B520EP><B540><B541>de</B541><B542>NETZWERKMODELLKOMPRIMIERUNGSVERFAHREN, -VORRICHTUNG UND -VORRICHTUNG, BILDERZEUGUNGSVERFAHREN UND MEDIUM</B542><B541>en</B541><B542>NETWORK MODEL COMPRESSION METHOD, APPARATUS AND DEVICE, IMAGE GENERATION METHOD, AND MEDIUM</B542><B541>fr</B541><B542>PROCÉDÉ, APPAREIL ET DISPOSITIF DE COMPRESSION DE MODÈLE DE RÉSEAU, PROCÉDÉ DE GÉNÉRATION D'IMAGE ET SUPPORT</B542></B540><B560><B561><text>CN-A- 110 084 281</text></B561><B561><text>CN-A- 110 796 251</text></B561><B561><text>CN-A- 110 796 619</text></B561><B561><text>CN-A- 113 780 534</text></B561><B561><text>US-A1- 2020 302 295</text></B561><B562><text>HOU LIANG ET AL: "Slimmable Generative Adversarial Networks", PROCEEDINGS OF THE AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, vol. 35, no. 9, 18 May 2021 (2021-05-18), pages 7746 - 7753, XP093209863, ISSN: 2159-5399, DOI: 10.1609/aaai.v35i9.16946</text></B562><B562><text>JIN QING ET AL: "Teachers Do More Than Teach: Compressing Image-to-Image Models", ARXIV, 5 March 2021 (2021-03-05), pages 1 - 18, XP093203233, Retrieved from the Internet &lt;URL:https://arxiv.org/pdf/2103.03467v1&gt; DOI: 10.1109/CVPR46437.2021.01339</text></B562><B565EP><date>20241010</date></B565EP></B560></B500><B700><B720><B721><snm>WU, Jie</snm><adr><city>Beijing 100086</city><ctry>CN</ctry></adr></B721><B721><snm>LI, Shaojie</snm><adr><city>Beijing 100086</city><ctry>CN</ctry></adr></B721><B721><snm>XIAO, Xuefeng</snm><adr><city>Beijing 100086</city><ctry>CN</ctry></adr></B721></B720><B730><B731><snm>Beijing Zitiao Network Technology Co., Ltd.</snm><iid>101948104</iid><irf>PM367744EP</irf><adr><str>0207, 2/F, Building 4
Zijin Digital Park
Haidian District</str><city>Beijing 100190</city><ctry>CN</ctry></adr></B731></B730><B740><B741><snm>Marks &amp; Clerk LLP</snm><iid>101955708</iid><adr><str>15 Fetter Lane</str><city>London EC4A 1BW</city><ctry>GB</ctry></adr></B741></B740></B700><B800><B840><ctry>AL</ctry><ctry>AT</ctry><ctry>BE</ctry><ctry>BG</ctry><ctry>CH</ctry><ctry>CY</ctry><ctry>CZ</ctry><ctry>DE</ctry><ctry>DK</ctry><ctry>EE</ctry><ctry>ES</ctry><ctry>FI</ctry><ctry>FR</ctry><ctry>GB</ctry><ctry>GR</ctry><ctry>HR</ctry><ctry>HU</ctry><ctry>IE</ctry><ctry>IS</ctry><ctry>IT</ctry><ctry>LI</ctry><ctry>LT</ctry><ctry>LU</ctry><ctry>LV</ctry><ctry>MC</ctry><ctry>MK</ctry><ctry>MT</ctry><ctry>NL</ctry><ctry>NO</ctry><ctry>PL</ctry><ctry>PT</ctry><ctry>RO</ctry><ctry>RS</ctry><ctry>SE</ctry><ctry>SI</ctry><ctry>SK</ctry><ctry>SM</ctry><ctry>TR</ctry></B840><B860><B861><dnum><anum>CN2022119638</anum></dnum><date>20220919</date></B861><B862>zh</B862></B860><B870><B871><dnum><pnum>WO2023045870</pnum></dnum><date>20230330</date><bnum>202313</bnum></B871></B870></B800></SDOBI>
<description id="desc" lang="en"><!-- EPO <DP n="1"> -->
<heading id="h0001">TECHNICAL FIELD</heading>
<p id="p0001" num="0001">The present disclosure relates to the field of computer technology and, in particular, to a network model compression method, apparatus and device, an image generation method, and a medium.</p>
<heading id="h0002">BACKGROUND</heading>
<p id="p0002" num="0002">Generative Adversarial Network (GAN) is a deep learning model and is one of the most promising methods for unsupervised learning on complex distributions in recent years, which is widely used in various image synthesis tasks, such as image generation, image resolution, and super-resolution.</p>
<p id="p0003" num="0003">The non-patent document "Slimmable Generative Adversarial Networks" introduces slimmable GANs (SlimGANs), which can flexibly switch the width of the generator to accommodate various quality-efficiency trade-offs at runtime. Specifically, multiple discriminators that share partial parameters are leveraged to train the slimmable generator. To facilitate the consistency between generators of different widths, a stepwise inplace distillation technique that encourages narrow generators to learn from wide ones is presented. As for class-conditional generation, a sliceable conditional batch normalization that incorporates the label<!-- EPO <DP n="2"> --> information into different widths is proposed. The methods are validated, both quantitatively and qualitatively, by extensive experiments and a detailed ablation study.</p>
<p id="p0004" num="0004">The non-patent document "Teachers Do More Than Teach Compressing Image-To-Image Models" aims to address issues that Generative Adversarial Networks (GANs) suffer from low efficiency due to tremendous computational cost and bulky memory usage in generating high-fidelity images. This work is realized by introducing a teacher network that provides a search space in which efficient network architectures can be found, in addition to performing knowledge distillation. First, the search space of generative models is visited, introducing an inception-based residual block into generators. Second, to achieve target computation cost, a one-step pruning algorithm that searches a student architecture from the teacher model and substantially reduces searching cost is proposed. It requires no l1 sparsity regularization and its associated hyper-parameters, simplifying the training procedure. Finally, it proposes to distill knowledge through maximizing feature similarity between teacher and student via an index named Global Kernel Alignment (GKA). The compressed networks achieve similar or even better image fidelity (FID, mIoU) than the original models with much-reduced computational cost, e.g., MACs.</p>
<heading id="h0003">SUMMARY</heading>
<p id="p0005" num="0005">At least one embodiment of the present disclosure provides a network model compression method, apparatus and device, an image generation method, and a medium, which may solve one or more problems in the art. The object is achieved by the features of the respective independent claims. Further embodiments are defined in the respective dependent claims.</p>
<heading id="h0004">BRIEF DESCRIPTION OF DRAWINGS</heading>
<p id="p0006" num="0006">The drawings herein are incorporated into and form a part of the specification, illustrate the embodiments consistent with the present disclosure, and are used in conjunction with the specification to explain the principles of the present disclosure.<!-- EPO <DP n="3"> --></p>
<p id="p0007" num="0007">In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or in prior art, the drawings to be used in the description of the embodiments or prior art will be briefly described below, and it will be obvious to those ordinarily skilled in the art that other drawings can be obtained on the basis of these drawings without inventive work.
<ul id="ul0001" list-style="none" compact="compact">
<li><figref idref="f0001">FIG. 1</figref> is a flowchart of a network model compression method according to an embodiment of the present disclosure;</li>
<li><figref idref="f0002">FIG. 2</figref> is a flowchart of a network model compression method according to an embodiment of the present disclosure;</li>
<li><figref idref="f0003">FIG. 3</figref> is a flowchart of a network model compression method according to an embodiment of the present disclosure;</li>
<li><figref idref="f0004">FIG. 4</figref> is a flowchart of an image generation method according to an embodiment of the present disclosure;</li>
<li><figref idref="f0004">FIG. 5</figref> is a schematic diagram of a structure of a network model compression apparatus according to an embodiment of the present disclosure; and</li>
<li><figref idref="f0004">FIG. 6</figref> is a schematic diagram of a structure of a network model compression device according to an embodiment of the present disclosure.</li>
</ul></p>
<heading id="h0005">DETAILED DESCRIPTION</heading>
<p id="p0008" num="0008">In order to understand the above objects, features and advantages of the present disclosure more clearly, the solutions of the present disclosure will be further described below. It should be noted that, in case of no conflict, the features in one embodiment or in different embodiments can be combined.</p>
<p id="p0009" num="0009">Many specific details are set forth in the following description to fully understand the present disclosure, but the present disclosure can also be implemented in other ways different from those described here; obviously, the embodiments in the specification are a part but not all of the embodiments of the present disclosure.</p>
<p id="p0010" num="0010">As GAN with a larger model usually consumes more computing resources, when it is applied to devices with a poor computing capacity such as mobile phones, the delay is long and real-time application requirements cannot be met. Therefore, in the related art,<!-- EPO <DP n="4"> --> the overall model size of the GAN is reduced by compressing a generator. However, the applicant found that mode collapse phenomenon occurs when only the generator is compressed while the structure of a discriminator remains unchanged.</p>
<p id="p0011" num="0011">The applicant found through research that for a well-trained GAN, its generator and discriminator are comparable to each other in the state. After the generator is compressed, the performance of the generator will decrease, while the structure of the discriminator remains unchanged, that is, the performance of the discriminator remains unchanged, so that the Nash equilibrium between the generator and the discriminator is broken, resulting in mode collapse phenomenon.</p>
<p id="p0012" num="0012">In view of this, the embodiments of the present disclosure provide a network model compression method. By performing pruning processing on a first generator, a second generator is obtained, and states of convolution kernels in a first discriminator is configured to enable a part of the convolution kernels to be in an activated state and the other part of the convolution kernels to be in a suppressed state, so as to obtain a second discriminator, such that a first loss difference between the first generator and the first discriminator is close to a second loss difference between the second generator and the second discriminator, and thus the Nash equilibrium between the second generator and the second discriminator can be maintained, thereby avoiding the mode collapse phenomenon. Hereinafter, the method will be introduced with reference to specific embodiments.</p>
<p id="p0013" num="0013"><figref idref="f0001">FIG. 1</figref> is a flowchart of a network model compression method according to an embodiment of the present disclosure, and the method may be performed by a network model compression device. The network model compression device may be illustratively understood as a device with a computing function such as a portable Android device, a laptop computer, or a desktop computer. The method can compress a network model to be compressed including a first generator and a first discriminator. As shown in <figref idref="f0001">FIG. 1</figref>, the method of the present embodiment includes the following S110-S120.</p>
<p id="p0014" num="0014">S110: performing pruning processing on a first generator to obtain a second generator.</p>
<p id="p0015" num="0015">Specifically, the specific implementation for performing pruning processing on the first generator may be set by those skilled in the art according to the actual situation, and is not limited herein. In one possible embodiment, performing pruning processing on the<!-- EPO <DP n="5"> --> first generator includes: selectively deleting convolution kernels in the first generator such that convolution kernels with the importance less than a preset importance threshold are deleted and convolution kernels with the importance greater than or equal to the preset importance threshold are retained.</p>
<p id="p0016" num="0016">Illustratively, each convolutional layer (CL) in the first generator is provided with a batch normalization (BN) layer, and each CL includes at least one convolution kernel. Each convolution kernel is correspondingly provided with a scaling factor in the BN layer corresponding to the CL to which the convolution kernel belongs, where the scaling factor is used for characterizing the importance of its corresponding convolution kernel. The scaling factor corresponding to each convolution kernel is added to an objective function of the first generator by direct summation to obtain <maths id="math0001" num=""><math display="inline"><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">T</mi></msup><mo>+</mo><mstyle displaystyle="true"><msubsup><mo>∑</mo><mn>1</mn><mi mathvariant="normal">A</mi></msubsup><mi>scale</mi><mfenced><mi mathvariant="normal">a</mi></mfenced></mstyle></math><img id="ib0001" file="imgb0001.tif" wi="33" he="7" img-content="math" img-format="tif" inline="yes"/></maths>, where L<sub>G</sub> <sup>T</sup> is the objective function of the first generator, A is the total number of convolution kernels in the first generator, and scale(a) is a scaling factor for an a-th convolution kernel. Then, the first generator and the first discriminator are trained. Specifically, each training includes determining the scaling factor according to <maths id="math0002" num=""><math display="inline"><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">T</mi></msup><mo>+</mo><mstyle displaystyle="true"><msubsup><mo>∑</mo><mn>1</mn><mi mathvariant="normal">A</mi></msubsup><mi>scale</mi><mfenced><mi mathvariant="normal">a</mi></mfenced></mstyle></math><img id="ib0002" file="imgb0002.tif" wi="33" he="7" img-content="math" img-format="tif" inline="yes"/></maths>. When the total number of training times is reached, the scaling factors for respective convolution kernels are ranked from small to large, and the convolution kernels with smaller scaling factors are deleted using a binary search algorithm until the computational amount of the first generator meets the preset given computational amount.</p>
<p id="p0017" num="0017">Illustratively, each CL in the first generator includes at least one convolution kernel, and each convolution kernel is correspondingly provided with a weight parameter, where the weight parameter of a convolution kernel is used for characterizing the importance of the convolution kernel corresponding to the weight parameter. The weight parameter corresponding to each convolution kernel is added to the objective function of the first generator by direct summation to obtain <maths id="math0003" num=""><math display="inline"><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">T</mi></msup><mo>+</mo><mstyle displaystyle="true"><msubsup><mo>∑</mo><mn>1</mn><mi mathvariant="normal">A</mi></msubsup><mi mathvariant="normal">L</mi><mfenced><mi mathvariant="normal">a</mi></mfenced></mstyle></math><img id="ib0003" file="imgb0003.tif" wi="26" he="7" img-content="math" img-format="tif" inline="yes"/></maths>, where L<sub>G</sub> <sup>T</sup> is the objective function of the first generator, A is the total number of convolution kernels in the first generator, and L(a) is a weight parameter for the a-th convolution kernel. Then, the first generator and the first discriminator are trained. Specifically, each training includes determining the weight parameter according to <maths id="math0004" num=""><math display="inline"><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">T</mi></msup><mo>+</mo><mstyle displaystyle="true"><msubsup><mo>∑</mo><mn>1</mn><mi mathvariant="normal">A</mi></msubsup><mi mathvariant="normal">L</mi><mfenced><mi mathvariant="normal">a</mi></mfenced></mstyle></math><img id="ib0004" file="imgb0004.tif" wi="26" he="7" img-content="math" img-format="tif" inline="yes"/></maths>. When the total number of training times is reached, the weight parameters for the respective convolution kernels are ranked from small to large, and the convolution kernels with smaller weight parameters are<!-- EPO <DP n="6"> --> deleted using binary search algorithm until the computational amount of the first generator meets the preset given computational amount.</p>
<p id="p0018" num="0018">In the above-mentioned two manners, the specific number of training times and the specific value of the preset given computational amount may be set by those skilled in the art according to the actual situation, and are not limited herein.</p>
<p id="p0019" num="0019">S120: configuring states of convolution kernels in the first discriminator to enable a part of the convolution kernels to be in an activated state and the other part of the convolution kernels to be in a suppressed state, so as to obtain a second discriminator.</p>
<p id="p0020" num="0020">Specifically, when the compressed network model is put into use, the convolution kernels in the suppressed state do not work, and the convolution kernels in the activated state work normally.</p>
<p id="p0021" num="0021">Herein, a loss difference between the first generator and the first discriminator is a first loss difference, a loss difference between the second generator and the second discriminator is a second loss difference, and an absolute value of a difference value between the first loss difference and the second loss difference is less than a first preset threshold.</p>
<p id="p0022" num="0022">Specifically, the first loss difference is used for characterizing the difference between the performance of the first generator and the performance of the first discriminator, which may be obtained through calculation according to the objective function of the first generator and a loss function of the first discriminator with respect to false pictures. In the same way, the second loss difference is used for characterizing the difference between the performance of the second generator and the performance of the second discriminator, which may be obtained through calculation according to an objective function of the second generator and a loss function of the second discriminator with respect to false pictures.</p>
<p id="p0023" num="0023">It should be understood that because the network model to be compressed is a well-trained GAN, the first generator and the first discriminator are in a Nash equilibrium state. After the pruning processing is performed on the first generator and the states of the convolution kernels in the first discriminator are configured, the first loss difference can be close to the second loss difference, that is, the Nash equilibrium between the second<!-- EPO <DP n="7"> --> generator and the second discriminator can be maintained. In this way, the mode collapse phenomenon can be avoided.</p>
<p id="p0024" num="0024">Specifically, the specific implementation for configuring states of the convolution kernels in the first discriminator may be set by those skilled in the art according to the actual situation, and is not limited herein.</p>
<p id="p0025" num="0025">In one possible embodiment, S120 includes: freezing a retention factor corresponding to each convolution kernel in the second discriminator, and determining a first weight parameter of the second discriminator; freezing the first weight parameter of the second discriminator and a second weight parameter of the second generator, and determining respective retention factors; and repeatedly performing operations of determining the first weight parameter of the second discriminator and determining the respective retention factors until the absolute value of the difference value between the first loss difference and the second loss difference is less than the first preset threshold.</p>
<p id="p0026" num="0026">In the step, the retention factor is used for characterizing the importance of a convolution kernel corresponding the retention factor.</p>
<p id="p0027" num="0027">Specifically, a retention factor is configured for each convolution kernel in the first discriminator to obtain a second discriminator, and an initial value of the retention factor corresponding to each convolution kernel may be 1. In the second discriminator obtained finally, the values of the retention factors corresponding to the convolution kernels in the activated state may be 1, and the values of the retention factors corresponding to the convolution kernels in the suppressed state may be 0.</p>
<p id="p0028" num="0028">Specifically, the first weight parameter described herein includes weight parameters corresponding to other elements in the second discriminator other than the respective retention factors for the convolution kernels. The second weight parameter described herein includes weight parameters corresponding to elements (e.g., convolution kernels) in the second generator.</p>
<p id="p0029" num="0029">Specifically, the specific implementation for determining the first weight parameter of the second discriminator may be set by those skilled in the art according to the actual situation, and is not limited herein. In one possible embodiment, determining the first weight parameter of the second discriminator includes: determining the first weight parameter of the second discriminator according to an objective function of the second<!-- EPO <DP n="8"> --> discriminator. In one possible embodiment, before determining the first weight parameter of the second discriminator according to the objective function of the second discriminator, the method may further include determining the second weight parameter of the second generator according to an objective function of the second generator.</p>
<p id="p0030" num="0030">Specifically, the specific implementation for determining the respective retention factors may be set by those skilled in the art according to the actual situation, and is not limited herein. In one possible embodiment, the respective retention factors are determined according to an objective function of the respective retention factors.</p>
<p id="p0031" num="0031">Illustratively, firstly, the retention factor remains unchanged, and the second weight parameter of the second generator is determined by optimizing the objective function of the second generator; and the first weight parameter of the second discriminator is determined by optimizing the objective function of the second discriminator. Then, the first weight parameter of the second discriminator and the second weight parameter of the second generator remain unchanged, and the retention factors for the respective convolution kernels are determined by optimizing the objective function of the retention factors. When it is detected that the absolute value of the difference value between the first loss difference and the second loss difference is less than the first preset threshold, the training may be ended; when it is detected that the absolute value of the difference between the first loss difference and the second loss difference is greater than or equal to the first preset threshold, the method returns to perform the operations of "determining the second weight parameter of the second generator and determining the first weight parameter of the second discriminator" and "determining the retention factors for the respective convolution kernels" until the absolute value of the difference value between the first loss difference and the second loss difference is less than the first preset threshold.</p>
<p id="p0032" num="0032">In the embodiments of the present disclosure, the second generator is obtained by performing pruning processing on the first generator; and the states of the convolution kernels in the first discriminator are configured to enable a part of the convolution kernels to be in the activated state and the other part of the convolution kernels to be in the suppressed state, so as to obtain the second discriminator; the loss difference between the first generator and the first discriminator is the first loss difference, the loss difference between the second generator and the second discriminator is the second loss difference,<!-- EPO <DP n="9"> --> and the absolute value of the difference value between the first loss difference and the second loss difference is less than the first preset threshold. Because the embodiments of the present disclosure can cooperatively compress the generator and the discriminator, the compressed generator and the compressed discriminator can maintain Nash equilibrium, thereby avoiding the mode collapse phenomenon. Moreover, the respective retention factors and the second weight parameter of the second generator and the first weight parameter of the second discriminator are alternately determined until the absolute value of the difference value between the first loss difference and the second loss difference is less than the first preset threshold, and the performance of the second generator and the second discriminator may be optimized in the process of approximating the second loss difference to the first loss difference.</p>
<p id="p0033" num="0033"><figref idref="f0002">FIG. 2</figref> is a flowchart of a network model compression method according to an embodiment of the present disclosure. As shown in <figref idref="f0002">FIG. 2</figref>, the method of the present embodiment includes the following S210-S280.</p>
<p id="p0034" num="0034">S210: performing pruning processing on a first generator to obtain a second generator.</p>
<p id="p0035" num="0035">S220: determining an objective function of the second generator according to a loss function of the second generator.</p>
<p id="p0036" num="0036">Specifically, the specific implementation for S220 may be set by those skilled in the art according to the actual situation, and is not limited herein.</p>
<p id="p0037" num="0037">Illustratively, the objective function of the second generator is as follows: <maths id="math0005" num=""><math display="block"><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">S</mi></msup><mo>=</mo><msub><mi mathvariant="normal">E</mi><mrow><mi mathvariant="normal">z</mi><mo>∼</mo><mi mathvariant="normal">p</mi><mfenced><mi mathvariant="normal">z</mi></mfenced></mrow></msub><mfenced open="[" close="]" separators=""><msub><msup><mi mathvariant="normal">f</mi><mi mathvariant="normal">S</mi></msup><mi mathvariant="normal">G</mi></msub><mfenced separators=""><mo>−</mo><msup><mi mathvariant="normal">D</mi><mi mathvariant="normal">S</mi></msup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">S</mi></msup><mfenced><mi mathvariant="normal">Z</mi></mfenced></mfenced></mfenced></mfenced><mo>;</mo></math><img id="ib0005" file="imgb0005.tif" wi="60" he="6" img-content="math" img-format="tif"/></maths> where L<sub>G</sub> <sup>S</sup> represents the objective function of the second generator, G<sup>S</sup>(Z) represents a false picture generated by the second generator according to a noise signal, D<sup>S</sup>(G<sup>S</sup>(Z)) represents a response value of the second discriminator to the false picture generated by the second generator, f<sup>S</sup> <sub>G</sub>(-D<sup>S</sup>(G<sup>S</sup>(Z))) represents the loss function of the second generator, E(*) represents an expected value of a distribution function, and p(z) represents the noise distribution.</p>
<p id="p0038" num="0038">S230: determining an objective function of a second discriminator according to a loss function of the second discriminator with respect to real pictures and a loss function of the second discriminator with respect to false pictures.<!-- EPO <DP n="10"> --></p>
<p id="p0039" num="0039">Specifically, the specific implementation for S230 may be set by those skilled in the art according to the actual situation, and is not limited herein.</p>
<p id="p0040" num="0040">Illustratively, the objective function of the second discriminator is as follows: <maths id="math0006" num=""><math display="block"><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">D</mi></msub><mi mathvariant="normal">S</mi></msup><mo>=</mo><msub><mi mathvariant="normal">E</mi><mrow><mi mathvariant="normal">x</mi><mo>∼</mo><mi>pdata</mi></mrow></msub><mfenced open="[" close="]" separators=""><msub><msup><mi mathvariant="normal">f</mi><mi mathvariant="normal">S</mi></msup><mi mathvariant="normal">D</mi></msub><mfenced separators=""><mo>−</mo><mi mathvariant="normal">D</mi><mfenced><mi mathvariant="normal">x</mi></mfenced></mfenced></mfenced><mo>+</mo><msub><mi mathvariant="normal">E</mi><mrow><mi mathvariant="normal">z</mi><mo>∼</mo><mi mathvariant="normal">p</mi><mfenced><mi mathvariant="normal">z</mi></mfenced></mrow></msub><mfenced open="[" close="]" separators=""><msub><msup><mi mathvariant="normal">f</mi><mi mathvariant="normal">S</mi></msup><mi mathvariant="normal">D</mi></msub><mfenced separators=""><msup><mi mathvariant="normal">D</mi><mi mathvariant="normal">S</mi></msup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">S</mi></msup><mfenced><mi mathvariant="normal">Z</mi></mfenced></mfenced></mfenced></mfenced><mo>;</mo></math><img id="ib0006" file="imgb0006.tif" wi="101" he="6" img-content="math" img-format="tif"/></maths> where L<sub>D</sub> <sup>S</sup> represents the objective function of the second discriminator, D(x) represents a response value of the second discriminator to a real picture, f<sup>S</sup> <sub>D</sub>(-D(x)) represents the loss function of the second discriminator with respect to real pictures, E(*) represents an expected value of the distribution function, pdata represents the distribution of real pictures, G<sup>S</sup>(Z) represents a false picture generated by the second generator according to a noise signal, D<sup>S</sup>(G<sup>S</sup>(Z)) represents a response value of the second discriminator to the false picture generated by the second generator, f<sup>S</sup> <sub>D</sub>(D<sup>S</sup>(G<sup>S</sup>(Z))) represents the loss function of the second discriminator with respect to false picture generated by the second generator, and p(z) represents the noise distribution.</p>
<p id="p0041" num="0041">S240: determining the objective function of the respective retention factors according to the objective function of the second generator, the objective function of the second discriminator, the loss function of the second discriminator with respect to false pictures, an objective function of the first generator, and a loss function of the first discriminator with respect to false pictures.</p>
<p id="p0042" num="0042">Specifically, the specific implementation for S240 may be set by those skilled in the art according to the actual situation, and is not limited herein.</p>
<p id="p0043" num="0043">Illustratively, the objective function of the retention factor is as follows: <maths id="math0007" num=""><math display="block"><msub><mi mathvariant="normal">L</mi><mi>arch</mi></msub><mo>=</mo><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">D</mi></msub><mi mathvariant="normal">S</mi></msup><mo>+</mo><mfenced open="‖" close="‖" separators=""><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">S</mi></msup><mo>−</mo><msub><msup><mi mathvariant="normal">L</mi><mi mathvariant="normal">S</mi></msup><mi>Dfake</mi></msub></mfenced><mo>−</mo><mfenced open="‖" close="‖" separators=""><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">T</mi></msup><mo>−</mo><msub><msup><mi mathvariant="normal">L</mi><mi mathvariant="normal">T</mi></msup><mi>Dfake</mi></msub></mfenced><mo>;</mo></math><img id="ib0007" file="imgb0007.tif" wi="92" he="8" img-content="math" img-format="tif"/></maths> <maths id="math0008" num=""><math display="block"><msub><msup><mi mathvariant="normal">L</mi><mi mathvariant="normal">S</mi></msup><mi>Dfake</mi></msub><mo>=</mo><msub><mi mathvariant="normal">E</mi><mrow><mi mathvariant="normal">z</mi><mo>∼</mo><mi mathvariant="normal">p</mi><mfenced><mi mathvariant="normal">z</mi></mfenced></mrow></msub><mfenced open="[" close="]" separators=""><msub><msup><mi mathvariant="normal">f</mi><mi mathvariant="normal">S</mi></msup><mi mathvariant="normal">D</mi></msub><mfenced separators=""><msup><mi mathvariant="normal">D</mi><mi mathvariant="normal">S</mi></msup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">S</mi></msup><mfenced><mi mathvariant="normal">Z</mi></mfenced></mfenced></mfenced></mfenced><mo>;</mo></math><img id="ib0008" file="imgb0008.tif" wi="63" he="6" img-content="math" img-format="tif"/></maths> <maths id="math0009" num=""><math display="block"><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">T</mi></msup><mo>=</mo><msub><mi mathvariant="normal">E</mi><mrow><mi mathvariant="normal">z</mi><mo>∼</mo><mi mathvariant="normal">p</mi><mfenced><mi mathvariant="normal">z</mi></mfenced></mrow></msub><mfenced open="[" close="]" separators=""><msub><msup><mi mathvariant="normal">f</mi><mi mathvariant="normal">T</mi></msup><mi mathvariant="normal">G</mi></msub><mfenced separators=""><mo>−</mo><msup><mi mathvariant="normal">D</mi><mi mathvariant="normal">T</mi></msup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">T</mi></msup><mfenced><mi mathvariant="normal">Z</mi></mfenced></mfenced></mfenced></mfenced><mo>;</mo></math><img id="ib0009" file="imgb0009.tif" wi="61" he="6" img-content="math" img-format="tif"/></maths> <maths id="math0010" num=""><math display="block"><msub><msup><mi mathvariant="normal">L</mi><mi mathvariant="normal">T</mi></msup><mi>Dfake</mi></msub><mo>=</mo><msub><mi mathvariant="normal">E</mi><mrow><mi mathvariant="normal">z</mi><mo>∼</mo><mi mathvariant="normal">p</mi><mfenced><mi mathvariant="normal">z</mi></mfenced></mrow></msub><mfenced open="[" close="]" separators=""><msub><msup><mi mathvariant="normal">f</mi><mi mathvariant="normal">T</mi></msup><mi mathvariant="normal">D</mi></msub><mfenced separators=""><msup><mi mathvariant="normal">D</mi><mi mathvariant="normal">T</mi></msup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">T</mi></msup><mfenced><mi mathvariant="normal">Z</mi></mfenced></mfenced></mfenced></mfenced><mo>;</mo></math><img id="ib0010" file="imgb0010.tif" wi="64" he="6" img-content="math" img-format="tif"/></maths> where L<sub>arch</sub> represents the objective function of the retention factor, L<sub>G</sub> <sup>S</sup> represents the objective function of the second generator, L<sub>D</sub> <sup>S</sup> represents the objective function of the second discriminator, and L<sup>S</sup><sub>Dfake</sub> represents the loss function of the second discriminator with respect to false pictures, whose detailed explanations are shown above and will not be repeated herein; L<sub>G</sub> <sup>T</sup> represents the objective function of the first generator, L<sup>T</sup><sub>Dfake</sub><!-- EPO <DP n="11"> --> represents the loss function of the first discriminator with respect to false pictures, G<sup>T</sup>(Z) represents a false picture generated by the first generator according to a noise signal, D<sup>T</sup>(G<sup>T</sup>(Z)) represents a response value of the first discriminator to the false picture generated by the first generator, f<sup>T</sup> <sub>G</sub>(-D<sup>T</sup>(G<sup>T</sup>(Z))) represents the loss function of the first generator, f<sup>T</sup> <sub>D</sub>(D<sup>T</sup>(G<sup>T</sup>(Z))) represents the loss function of the first discriminator with respect to false pictures generated by the first generator, E(*) represents an expected value of the distribution function, and p(z) represents the noise distribution.</p>
<p id="p0044" num="0044">S250: freezing a retention factor corresponding to each convolution kernel in the second discriminator, and determining a second weight parameter of the second generator according to the objective function of the second generator; and determining a first weight parameter of the second discriminator according to the objective function of the second discriminator.</p>
<p id="p0045" num="0045">Specifically, the specific implementation for S250 may be set by those skilled in the art according to the actual situation, and is not limited herein.</p>
<p id="p0046" num="0046">Illustratively, the retention factor for each convolution kernel remains unchanged, and the second weight parameter of the second generator is updated such that the objective function L<sub>G</sub> <sup>S</sup> of the second generator becomes smaller, and thus the second weight parameter of the second generator is determined; the first weight parameter of the second discriminator is updated such that the objective function L<sub>D</sub> <sup>S</sup> of the second discriminator becomes smaller, and thus the first weight parameter of the second discriminator is determined.</p>
<p id="p0047" num="0047">S260: freezing the first weight parameter of the second discriminator and the second weight parameter of the second generator, and determining the retention factors according to the objective function of the retention factors.</p>
<p id="p0048" num="0048">Specifically, the specific implementation for S260 may be set by those skilled in the art according to the actual situation, and is not limited herein.</p>
<p id="p0049" num="0049">Illustratively, the second weight parameter of the second generator and the first weight parameter of the second discriminator remain unchanged, and the retention factor for each convolution kernel is updated, such that the objective function L<sub>arch</sub> of the retention factor becomes smaller, and thus the respective retention factors are determined.<!-- EPO <DP n="12"> --></p>
<p id="p0050" num="0050">S270: determining a second loss difference between the second generator and the second discriminator according to the objective function of the second generator and the loss function of the second discriminator with respect to false pictures.</p>
<p id="p0051" num="0051">Specifically, the specific implementation for S270 may be set by those skilled in the art according to the actual situation, and is not limited herein. In one possible embodiment, the absolute value of the difference value between the objective function of the second generator and the loss function of the second discriminator with respect to false pictures is taken as a second loss difference.</p>
<p id="p0052" num="0052">Illustratively, the second loss difference is as follows: <maths id="math0011" num=""><math display="block"><msup><mi>ΔL</mi><mi mathvariant="normal">S</mi></msup><mo>=</mo><mfenced open="|" close="|" separators=""><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">S</mi></msup><mo>−</mo><msub><msup><mi mathvariant="normal">L</mi><mi mathvariant="normal">S</mi></msup><mi>Dfake</mi></msub></mfenced><mo>;</mo></math><img id="ib0011" file="imgb0011.tif" wi="40" he="6" img-content="math" img-format="tif"/></maths> where ΔL<sup>S</sup> represents the second loss difference, and the specific explanations of L<sub>G</sub> <sup>S</sup> and L<sup>S</sup><sub>Dfake</sub> are shown above and will not be repeated herein.</p>
<p id="p0053" num="0053">S280: determining whether an absolute value of the difference value between a first loss difference and the second loss difference is less than a first preset threshold or not; if yes, ending the training; and if no, returning to perform S250.</p>
<p id="p0054" num="0054">Specifically, the specific implementation for S280 may be set by those skilled in the art according to the actual situation, and is not limited herein.</p>
<p id="p0055" num="0055">In one possible embodiment, the absolute value of the difference value between the objective function of the first generator and the loss function of the first discriminator with respect to false pictures is taken as the first loss difference; an absolute value of the difference value between the first loss difference and the second loss difference is calculated; and whether the absolute value of the difference between the first loss difference and the second loss difference is less than the first preset threshold or not is determined.</p>
<p id="p0056" num="0056">Illustratively, the first loss difference is as follows: <maths id="math0012" num=""><math display="block"><msup><mi>ΔL</mi><mi mathvariant="normal">T</mi></msup><mo>=</mo><mfenced open="|" close="|" separators=""><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">T</mi></msup><mo>−</mo><msub><msup><mi mathvariant="normal">L</mi><mi mathvariant="normal">T</mi></msup><mi>Dfake</mi></msub></mfenced><mo>;</mo></math><img id="ib0012" file="imgb0012.tif" wi="41" he="6" img-content="math" img-format="tif"/></maths> where ΔL<sup>T</sup> represents the first loss difference, and the specific explanations of L<sub>G</sub> <sup>T</sup> and L<sup>T</sup><sub>Dfake</sub> are shown above and will not be repeated herein.</p>
<p id="p0057" num="0057">Then the absolute value of the difference value between the first loss difference and the second loss difference is as follows:<!-- EPO <DP n="13"> --> <maths id="math0013" num=""><math display="block"><mi>ΔL</mi><mo>=</mo><mfenced open="|" close="|" separators=""><msup><mi>ΔL</mi><mi mathvariant="normal">S</mi></msup><mo>−</mo><msup><mi>ΔL</mi><mi mathvariant="normal">T</mi></msup></mfenced><mo>;</mo></math><img id="ib0013" file="imgb0013.tif" wi="33" he="6" img-content="math" img-format="tif"/></maths> then whether the absolute value ΔL of the difference between the first loss difference and the second loss difference is less than the first preset threshold or not is determined; if yes, the training is ended; if no, return to perform S250.</p>
<p id="p0058" num="0058">In the embodiments of the present disclosure, the objective function of the second generator is determined according to the loss function of the second generator, and the second weight parameter of the second generator is determined according to the objective function of the second generator; the objective function of the second discriminator is determined according to the loss function of the second discriminator with respect to real pictures and the loss function of the second discriminator with respect to false pictures, and the first weight parameter of the second discriminator is determined according to the objective function of the second discriminator; the objective function of the retention factors is determined according to the objective function of the first generator, the loss function of the first discriminator with respect to false pictures, the objective function of the second generator, the objective function of the second discriminator, and the loss function of the second discriminator with respect to false pictures, and the retention factors are determined according to the objective function of the retention factors. The loss function of the second generator and the loss function of the second discriminator with respect to false pictures can be reduced in the process of approximating the second loss difference to the first loss difference, and moreover, the loss function of the second discriminator with respect to real pictures can be improved, and thus the performance of the second generator and the second discriminator is optimized.</p>
<p id="p0059" num="0059"><figref idref="f0003">FIG. 3</figref> is a flowchart of a network model compression method according to an embodiment of the present disclosure. As shown in <figref idref="f0003">FIG. 3</figref>, the method of the present embodiment includes the following S310-S390.</p>
<p id="p0060" num="0060">S310: performing pruning processing on a first generator to obtain a second generator.</p>
<p id="p0061" num="0061">S320: taking the first generator and a first discriminator as a teacher generative adversarial network, and taking the second generator and a second discriminator as a student generative adversarial network.<!-- EPO <DP n="14"> --></p>
<p id="p0062" num="0062">S330: determining an objective function of the second generator according to a distillation objective function between the teacher generative adversarial network and the student generative adversarial network, and a loss function of the second generator.</p>
<p id="p0063" num="0063">Specifically, the first generator and the first discriminator are a well-trained network model with good accuracy and stability. The network model is taken as the teacher generative adversarial network to guide the student generative adversarial network for learning, which is beneficial to improving the performance of the second generator. There is usually a distillation loss when the teacher generative adversarial network guides the student generative adversarial network for learning, and the distillation loss can be reduced by optimizing the distillation objective function.</p>
<p id="p0064" num="0064">Specifically, the specific implementation for determining the distillation objective function may be set by those skilled in the art according to the actual situation, and is not limited herein.</p>
<p id="p0065" num="0065">In one possible embodiment, the specific implementation for determining the distillation objective function is as follows: determining a first similarity metric function according to a similarity between intermediate feature maps of at least one layer in the first generator and the second generator; inputting false pictures generated by the first generator into the first discriminator to obtain a first intermediate feature map of at least one layer in the first discriminator; inputting false pictures generated by the second generator into the first discriminator to obtain a second intermediate feature map of at least one layer in the first discriminator; determining a second similarity metric function according to a similarity between the first intermediate feature map of the at least one layer and the second intermediate feature map of the at least one layer; and determining the distillation objective function according to the first similarity metric function and the second similarity metric function.</p>
<p id="p0066" num="0066">Specifically, an intermediate feature map of the first generator refers to output information from a certain layer of the first generator; and an intermediate feature map of the second generator refers to output information from a certain layer of the second generator.</p>
<p id="p0067" num="0067">Specifically, the intermediate feature maps used for determining the first similarity metric function have the following characteristics: the intermediate feature maps obtained<!-- EPO <DP n="15"> --> from the first generator correspond to the intermediate feature maps obtained from the second generator in a one-to-one manner; that is, when an intermediate feature map of a certain layer (e.g., the first layer) is obtained from the first generator, an intermediate feature map with the same number of network layer (e.g., the first layer) needs to be obtained from the second generator. The intermediate feature maps obtained from which layers of the first generator and the second generator may be set by those skilled in the art according to the actual situation, and are not limited herein.</p>
<p id="p0068" num="0068">Specifically, the first similarity metric function is used for characterizing the degree of approximation of the intermediate layer information of the first generator and the second generator. The specific method for determining the first similarity metric function may be set by those skilled in the art according to the actual situation.</p>
<p id="p0069" num="0069">In one possible embodiment, determining the first similarity metric function according to the similarity between intermediate feature maps of at least one layer in the first generator and the second generator includes: inputting an intermediate feature map of an i-th layer in the first generator and an intermediate feature map of an i-th layer in the second generator into a similarity metric function to obtain a first sub-similarity metric function corresponding to the i-th layer, where i is a positive integer, i takes a value from 1 to M, and M is the total number of layers of the first generator and the second generator; and determining the first similarity metric function according to first sub-similarity metric functions corresponding to respective layers.</p>
<p id="p0070" num="0070">Specifically, the specific structure of the similarity metric function may be set by those skilled in the art according to the actual situation, and it is not limited herein. In one possible embodiment, the similarity metric function includes an MSE loss function and a Texture loss function.</p>
<p id="p0071" num="0071">Illustratively, the similarity metric function is as follows: <maths id="math0014" num=""><math display="block"><mi mathvariant="normal">d</mi><mfenced separators=""><mo>∗</mo><mo>,</mo><mo>∗</mo></mfenced><mo>=</mo><mfrac><mn>1</mn><msubsup><mi mathvariant="normal">c</mi><mn>1</mn><mn>2</mn></msubsup></mfrac><msqrt><mstyle displaystyle="true"><msub><mo>∑</mo><mrow><mi mathvariant="normal">p</mi><mo>,</mo><mi mathvariant="normal">q</mi></mrow></msub><msup><mfenced separators=""><msub><mi mathvariant="normal">G</mi><mi>pq</mi></msub><mfenced><mi mathvariant="normal">Ô</mi></mfenced><mo>−</mo><msub><mi mathvariant="normal">G</mi><mi>pq</mi></msub><mfenced><mi mathvariant="normal">O</mi></mfenced></mfenced><mn>2</mn></msup></mstyle></msqrt><mo>;</mo></math><img id="ib0014" file="imgb0014.tif" wi="70" he="11" img-content="math" img-format="tif"/></maths> where Ô, O represent two different intermediate feature maps inputted into the similarity metric function, respectively, G<sub>pq</sub>(Ô) represents an inner product between the feature of a p-th channel and the feature of a q-th channel in an intermediate feature map Ô, G<sub>ij</sub>(O) represents an inner product between the feature of a p-th channel and the feature of a q-th<!-- EPO <DP n="16"> --> channel in an intermediate feature map O, c<sub>l</sub> represents the total number of channels in the intermediate feature maps Ô, O inputted into the similarity metric function, and <maths id="math0015" num=""><math display="inline"><msqrt><mstyle displaystyle="true"><msub><mo>∑</mo><mrow><mi mathvariant="normal">p</mi><mo>,</mo><mi mathvariant="normal">q</mi></mrow></msub><msup><mfenced separators=""><msub><mi mathvariant="normal">G</mi><mi>pq</mi></msub><mfenced><mi mathvariant="normal">Ô</mi></mfenced><mo>−</mo><msub><mi mathvariant="normal">G</mi><mi>pq</mi></msub><mfenced><mi mathvariant="normal">O</mi></mfenced></mfenced><mn>2</mn></msup></mstyle></msqrt></math><img id="ib0015" file="imgb0015.tif" wi="49" he="11" img-content="math" img-format="tif" inline="yes"/></maths> represents the MSE loss function.</p>
<p id="p0072" num="0072">Illustratively, the first similarity metric function is as follows: <maths id="math0016" num=""><math display="block"><msub><mi mathvariant="normal">D</mi><mn>1</mn></msub><mo>=</mo><mstyle displaystyle="true"><msubsup><mo>∑</mo><mrow><mi mathvariant="normal">i</mi><mo>=</mo><mn>1</mn></mrow><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub></msubsup><msub><mi mathvariant="normal">E</mi><mrow><mi mathvariant="normal">z</mi><mo>∼</mo><mi mathvariant="normal">p</mi><mfenced><mi mathvariant="normal">z</mi></mfenced></mrow></msub><mfenced open="[" close="]" separators=""><mi mathvariant="normal">d</mi><mfenced separators=""><msub><mi mathvariant="normal">f</mi><mi mathvariant="normal">i</mi></msub><mfenced separators=""><msubsup><mi mathvariant="normal">G</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">S</mi></msubsup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced><mo>,</mo><msubsup><mi mathvariant="normal">G</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">T</mi></msubsup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced></mfenced><mo>;</mo></mstyle></math><img id="ib0016" file="imgb0016.tif" wi="73" he="9" img-content="math" img-format="tif"/></maths> where D<sub>1</sub> represents the first similarity metric function, L<sub>G</sub> represents the total number of intermediate feature maps obtained from the first generator, p(z) represents the noise distribution, <maths id="math0017" num=""><math display="inline"><mi mathvariant="normal">d</mi><mfenced separators=""><msub><mi mathvariant="normal">f</mi><mi mathvariant="normal">i</mi></msub><mfenced separators=""><msubsup><mi mathvariant="normal">G</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">S</mi></msubsup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced><mo>,</mo><msubsup><mi mathvariant="normal">G</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">T</mi></msubsup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced></math><img id="ib0017" file="imgb0017.tif" wi="38" he="9" img-content="math" img-format="tif" inline="yes"/></maths> represents a first sub-similarity metric function corresponding to the i-th layer, <maths id="math0018" num=""><math display="inline"><msubsup><mi mathvariant="normal">G</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">S</mi></msubsup><mfenced><mi mathvariant="normal">z</mi></mfenced></math><img id="ib0018" file="imgb0018.tif" wi="11" he="6" img-content="math" img-format="tif" inline="yes"/></maths> represents the intermediate feature map obtained from the i-th layer of the second generator, <maths id="math0019" num=""><math display="inline"><msubsup><mi mathvariant="normal">G</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">T</mi></msubsup><mfenced><mi mathvariant="normal">z</mi></mfenced></math><img id="ib0019" file="imgb0019.tif" wi="11" he="6" img-content="math" img-format="tif" inline="yes"/></maths> represents the intermediate feature map obtained from the i-th layer of the first generator, and <maths id="math0020" num=""><math display="inline"><msub><mi mathvariant="normal">f</mi><mi mathvariant="normal">i</mi></msub><mfenced separators=""><msubsup><mi mathvariant="normal">G</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">S</mi></msubsup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced></math><img id="ib0020" file="imgb0020.tif" wi="18" he="8" img-content="math" img-format="tif" inline="yes"/></maths> represents a learnable 1×1 convolutional layer used for converting the total number of channels of <maths id="math0021" num=""><math display="inline"><msubsup><mi mathvariant="normal">G</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">S</mi></msubsup><mfenced><mi mathvariant="normal">z</mi></mfenced></math><img id="ib0021" file="imgb0021.tif" wi="11" he="6" img-content="math" img-format="tif" inline="yes"/></maths> into the same number of the total number of channels of <maths id="math0022" num=""><math display="inline"><msubsup><mi mathvariant="normal">G</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">T</mi></msubsup><mfenced><mi mathvariant="normal">z</mi></mfenced></math><img id="ib0022" file="imgb0022.tif" wi="10" he="6" img-content="math" img-format="tif" inline="yes"/></maths>.</p>
<p id="p0073" num="0073">Specifically, the first intermediate feature map refers to output information from a certain layer of the first discriminator when a false picture generated by the first generator is input into the first discriminator; and the second intermediate feature map refers to output information from a certain layer of the first discriminator when a false picture generated by the second generator is input into the first discriminator.</p>
<p id="p0074" num="0074">It should be understood that, compared with an additional network model used for extracting the intermediate feature maps of the first generator and the second generator, the first discriminator used for extracting the intermediate feature maps of the first generator and the second generator in the embodiments of the present disclosure has the advantage of having a high correlation to the generation tasks of the first generator and the second generator and having a good capability of distinguishing the real images from the false images.</p>
<p id="p0075" num="0075">Specifically, the first intermediate feature maps correspond to the second intermediate feature maps in a one-to-one manner; that is, when the first intermediate feature map is an intermediate feature map of a certain layer (e.g., the first layer) in the<!-- EPO <DP n="17"> --> first discriminator, its corresponding second intermediate feature map is an intermediate feature map of this layer (e.g., the first layer) in the second discriminator. The intermediate feature maps obtained from which layers of the first discriminator and the second discriminator may be set by those skilled in the art according to the actual situation, and are not limited herein.</p>
<p id="p0076" num="0076">Specifically, the second similarity metric function is used for characterizing the degree of approximation of the intermediate layer information of the first discriminator and the second discriminator. The specific method for determining the second similarity metric function may be set by those skilled in the art according to the actual situation.</p>
<p id="p0077" num="0077">In one possible embodiment, determining the second similarity metric function according to a similarity between the first intermediate feature map and the second intermediate feature map corresponding to each layer includes: inputting a first intermediate feature map and a second intermediate feature map corresponding to a j-th layer into a similarity metric function to obtain a second sub-similarity metric function corresponding to the j-th layer, where j is a positive integer, 1 ≤ j ≤ N, j take a value from 1 to N, and N is the total number of layers of the first discriminator; and determining the second similarity metric function according to second sub-similarity metric functions corresponding to respective layers.</p>
<p id="p0078" num="0078">Illustratively, the second similarity metric function is as follows: <maths id="math0023" num=""><math display="block"><msub><mi mathvariant="normal">D</mi><mn>2</mn></msub><mo>=</mo><mstyle displaystyle="true"><msubsup><mo>∑</mo><mrow><mi mathvariant="normal">j</mi><mo>=</mo><mn>1</mn></mrow><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">D</mi></msub></msubsup><msub><mi mathvariant="normal">E</mi><mrow><mi mathvariant="normal">z</mi><mo>∼</mo><mi mathvariant="normal">p</mi><mfenced><mi mathvariant="normal">z</mi></mfenced></mrow></msub></mstyle><mfenced open="[" close="]" separators=""><mi mathvariant="normal">d</mi><mfenced separators=""><msubsup><mi mathvariant="normal">D</mi><mi mathvariant="normal">j</mi><mi mathvariant="normal">T</mi></msubsup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">S</mi></msup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced><mo>,</mo><msubsup><mi mathvariant="normal">D</mi><mi mathvariant="normal">j</mi><mi mathvariant="normal">T</mi></msubsup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">T</mi></msup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced></mfenced></mfenced><mo>;</mo></math><img id="ib0023" file="imgb0023.tif" wi="85" he="9" img-content="math" img-format="tif"/></maths> where D<sub>2</sub> represents the second similarity metric function, L<sub>D</sub> represents the total number of intermediate feature maps obtained from the first discriminator, p(z) represents the noise distribution, <maths id="math0024" num=""><math display="inline"><mi mathvariant="normal">d</mi><mfenced separators=""><msubsup><mi mathvariant="normal">D</mi><mi mathvariant="normal">j</mi><mi mathvariant="normal">T</mi></msubsup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">S</mi></msup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced><mo>,</mo><msubsup><mi mathvariant="normal">D</mi><mi mathvariant="normal">j</mi><mi mathvariant="normal">T</mi></msubsup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">T</mi></msup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced></mfenced></math><img id="ib0024" file="imgb0024.tif" wi="50" he="10" img-content="math" img-format="tif" inline="yes"/></maths> represents a second sub-similarity metric function corresponding to the j-th layer, <maths id="math0025" num=""><math display="inline"><msubsup><mi mathvariant="normal">D</mi><mi mathvariant="normal">j</mi><mi mathvariant="normal">T</mi></msubsup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">T</mi></msup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced></math><img id="ib0025" file="imgb0025.tif" wi="21" he="8" img-content="math" img-format="tif" inline="yes"/></maths> represents the first intermediate feature map corresponding to the j-th layer, and <maths id="math0026" num=""><math display="inline"><msubsup><mi mathvariant="normal">D</mi><mi mathvariant="normal">j</mi><mi mathvariant="normal">T</mi></msubsup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">S</mi></msup><mfenced><mi mathvariant="normal">z</mi></mfenced></mfenced></math><img id="ib0026" file="imgb0026.tif" wi="21" he="8" img-content="math" img-format="tif" inline="yes"/></maths> represents a second intermediate feature map corresponding to the j-th layer.</p>
<p id="p0079" num="0079">Specifically, the specific implementation for determining the distillation objective function according to the first similarity metric function and the second similarity metric<!-- EPO <DP n="18"> --> function may be set by those skilled in the art according to the actual situation, and is not limited herein.</p>
<p id="p0080" num="0080">In one possible embodiment, the first similarity metric function and the second similarity metric function are summed according to weights to determine the distillation objective function.</p>
<p id="p0081" num="0081">In one possible embodiment, the first similarity metric function and the second similarity metric function are directly summed to determine the distillation objective function.</p>
<p id="p0082" num="0082">Illustratively, the distillation objective function is as follows: <maths id="math0027" num=""><math display="block"><msub><mi>L</mi><mi>distill</mi></msub><mo>=</mo><msub><mi mathvariant="normal">D</mi><mn>1</mn></msub><mo>+</mo><msub><mi mathvariant="normal">D</mi><mn>2</mn></msub><mo>;</mo></math><img id="ib0027" file="imgb0027.tif" wi="33" he="5" img-content="math" img-format="tif"/></maths> where <img id="ib0028" file="imgb0028.tif" wi="12" he="6" img-content="character" img-format="tif" inline="yes"/> represents the distillation objective function, D<sub>1</sub> represents the first similarity metric function, and D<sub>2</sub> represents the second similarity metric function.</p>
<p id="p0083" num="0083">Specifically, the specific implementation for S330 may be set by those skilled in the art according to the actual situation, and is not limited herein.</p>
<p id="p0084" num="0084">In one possible embodiment, the distillation objective function and the objective function component determined according to the loss function of the second generator are directly summed to determine the objective function of the second generator.</p>
<p id="p0085" num="0085">In one possible embodiment, the distillation objective function and the objective function component determined according to the loss function of the second generator are summed according to weights to determine the objective function of the second generator.</p>
<p id="p0086" num="0086">Illustratively, the objective function of the second generator is as follows: <maths id="math0028" num=""><math display="block"><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">S</mi></msup><mo>=</mo><mfenced><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">S</mi></msup></mfenced><mo>′</mo><mo>+</mo><msub><mi>γL</mi><mi>distill</mi></msub><mo>;</mo></math><img id="ib0029" file="imgb0029.tif" wi="43" he="6" img-content="math" img-format="tif"/></maths> <maths id="math0029" num=""><math display="block"><mfenced><msup><msub><mi mathvariant="normal">L</mi><mi mathvariant="normal">G</mi></msub><mi mathvariant="normal">S</mi></msup></mfenced><mo>′</mo><mo>=</mo><msub><mi mathvariant="normal">E</mi><mrow><mi mathvariant="normal">z</mi><mo>∼</mo><mi mathvariant="normal">p</mi><mfenced><mi mathvariant="normal">z</mi></mfenced></mrow></msub><mfenced open="[" close="]" separators=""><msub><msup><mi mathvariant="normal">f</mi><mi mathvariant="normal">S</mi></msup><mi mathvariant="normal">G</mi></msub><mfenced separators=""><mo>−</mo><msup><mi mathvariant="normal">D</mi><mi mathvariant="normal">S</mi></msup><mfenced separators=""><msup><mi mathvariant="normal">G</mi><mi mathvariant="normal">S</mi></msup><mfenced><mi mathvariant="normal">Z</mi></mfenced></mfenced></mfenced></mfenced><mo>;</mo></math><img id="ib0030" file="imgb0030.tif" wi="64" he="7" img-content="math" img-format="tif"/></maths> where (L<sub>G</sub> <sup>S</sup>)' represents the objective function component determined according to the loss function of the second generator. It should be understood by those skilled in the art that when the first generator and the first discriminator are not taken as the teacher generative adversarial network, (L<sub>G</sub> <sup>S</sup>)' may be the objective function of the second generator, as shown in the example of the method in <figref idref="f0002">FIG. 2</figref>. Therefore, the specific explanation of (L<sub>G</sub> <sup>S</sup>)' is shown above and will not be repeated herein. L<sub>distill</sub> represents the distillation objective function, and γ represents the weight parameter of the distillation objective function.<!-- EPO <DP n="19"> --></p>
<p id="p0087" num="0087">S340: determining an objective function of the second discriminator according to a loss function of the second discriminator with respect to real pictures and a loss function of the second discriminator with respect to false pictures.</p>
<p id="p0088" num="0088">S350: determining an objective function of a retention factor according to the objective function of the second generator, the objective function of the second discriminator, the loss function of the second discriminator with respect to false pictures, an objective function of the first generator, and a loss function of the first discriminator with respect to false pictures.</p>
<p id="p0089" num="0089">S360: freezing the retention factors corresponding the respective convolution kernels in the second discriminator, and determining a second weight parameter of the second generator according to the objective function of the second generator; and determining a first weight parameter of the second discriminator according to the objective function of the second discriminator.</p>
<p id="p0090" num="0090">S370: freezing the first weight parameter of the second discriminator and the second weight parameter of the second generator, and determining the respective retention factors according to the objective function of the respective retention factors; when a retention factor is less than a second preset threshold, determining the retention factor to be 0; and when a retention factor is greater than or equal to the second preset threshold, determining the retention factor to be 1.</p>
<p id="p0091" num="0091">Specifically, the specific value of the second preset threshold may be set by those skilled in the art according to the actual situation, and it is not limited herein.</p>
<p id="p0092" num="0092">It should be understood that, by setting the retention factor to be 0 when the value of the retention factor is less than the second preset threshold, and setting the retention factor to be 1 when the value of the retention factor is greater than or equal to the second preset threshold, the process of setting the convolution kernels in a part of the first discriminator to be in the activated state and setting the convolution kernels in the other part of the first discriminator to be in the suppressed state is sped up, thereby improving the compression efficiency of the network model.</p>
<p id="p0093" num="0093">S380: determining a second loss difference between the second generator and the second discriminator according to the objective function of the second generator and the loss function of the second discriminator with respect to false pictures.<!-- EPO <DP n="20"> --></p>
<p id="p0094" num="0094">S390: determining whether an absolute value of the difference value between a first loss difference and the second loss difference is less than a first preset threshold or not; if yes, ending the training; and if no, returning to perform S360.</p>
<p id="p0095" num="0095">In the embodiments of the present disclosure, the intermediate layer feature maps in the first generator and the first discriminator are simultaneously utilized through the distillation method as additional supervision information to help the second generator to generate high-quality images. In this way, a lightweight second generator can be obtained, and it can also be ensured that the lightweight second generator can generate high-quality images.</p>
<p id="p0096" num="0096"><figref idref="f0004">FIG. 4</figref> is a flowchart of an image generation method according to an embodiment of the present disclosure, and the method can be executed by an electronic device. The electronic device may be illustratively understood as a device with a computing function, such as a portable Android device, a laptop computer, or a desktop computer. As shown in <figref idref="f0004">FIG. 4</figref>, the method of the present embodiment includes the following S410-S420.</p>
<p id="p0097" num="0097">S410: inputting a random noise signal into a second generator to enable the second generator to generate a false image according to the random noise signal.</p>
<p id="p0098" num="0098">S420: inputting the false image into a second discriminator to enable that the second discriminator discriminates that the false image is true and then outputs the false image.</p>
<p id="p0099" num="0099">In the steps, the second generator and the second discriminator are obtained by using the method according to any of the embodiments in <figref idref="f0001 f0002 f0003">FIG. 1 to FIG.3</figref> described above.</p>
<p id="p0100" num="0100">In the embodiments of the present disclosure, the second generator for generating a false image and the second discriminator for outputting the false image are obtained by using the network model compression method provided in the embodiments of the present disclosure. Because the second generator and the second discriminator are relatively lightweight, even if they are deployed to edge devices with limited resources, there will be no longer delay.</p>
<p id="p0101" num="0101"><figref idref="f0004">FIG. 5</figref> is a schematic diagram of a structure of a network model compression apparatus according to an embodiment of the present disclosure, and the network model compression apparatus may be understood as the network model compression device described above or part of functional modules in the network model compression device described above. The network model compression apparatus can compress a network<!-- EPO <DP n="21"> --> model to be compressed, and the network model to be compressed includes a first generator and a first discriminator. As shown in <figref idref="f0004">FIG. 5</figref>, the network model compression apparatus 500 includes a pruning module 510 and a configuration module 520.</p>
<p id="p0102" num="0102">The pruning module 510 is configured to perform pruning processing on the first generator to obtain a second generator.</p>
<p id="p0103" num="0103">The configuration module 520 is configured to configure states of convolution kernels in the first discriminator to enable a part of the convolution kernels to be in an activated state and the other part of the convolution kernels to be in a suppressed state, so as to obtain a second discriminator.</p>
<p id="p0104" num="0104">A loss difference between the first generator and the first discriminator is a first loss difference, a loss difference between the second generator and the second discriminator is a second loss difference, and an absolute value of a difference between the first loss difference and the second loss difference is less than a first preset threshold.</p>
<p id="p0105" num="0105">In one embodiment, the configuration module 520 includes:
<ul id="ul0002" list-style="none" compact="compact">
<li>a first determination submodule that may be configured to freeze a retention factor corresponding to each convolution kernel in the second discriminator, and determine a first weight parameter of the second discriminator, in which the retention factor is used for characterizing the importance of a convolution kernel corresponding the retention factor;</li>
<li>a second determination submodule that may be configured to freeze the first weight parameter of the second discriminator and a second weight parameter of the second generator, and determine respective retention factors;</li>
<li>and a repetition submodule that may be configured to repeatedly perform operations of determining the first weight parameter of the second discriminator and determining the respective retention factors until the absolute value of the difference value between the first loss difference and the second loss difference is less than the first preset threshold.</li>
</ul></p>
<p id="p0106" num="0106">In one embodiment, the first weight parameter includes weight parameters corresponding to other elements in the second discriminator other than the respective retention factors.</p>
<p id="p0107" num="0107">In one embodiment, the second weight parameter includes weight parameters corresponding to elements in the second generator.</p>
<p id="p0108" num="0108">In one embodiment, the first determination submodule includes:<!-- EPO <DP n="22"> -->
<ul id="ul0003" list-style="none" compact="compact">
<li>a first determination unit that may be configured to determine the second weight parameter of the second generator according to an objective function of the second generator;</li>
<li>and a second determination unit that may be configured to determine the first weight parameter of the second discriminator according to an objective function of the second discriminator.</li>
</ul></p>
<p id="p0109" num="0109">In one embodiment, the apparatus further includes:
<ul id="ul0004" list-style="none" compact="compact">
<li>an objective function determination module of the second generator, which may be configured to determine, before the second weight parameter of the second generator are determined according to the objective function of the second generator, the objective function of the second generator according to a loss function of the second generator;</li>
<li>and an objective function determination module of the second discriminator, which may be configured to determine the objective function of the second discriminator according to a loss function of the second discriminator with respect to real pictures and a loss function of the second discriminator with respect to false pictures.</li>
</ul></p>
<p id="p0110" num="0110">In one embodiment, the apparatus further includes a teacher and student determination module that may be configured to take, before the objective function of the second generator is determined according to the loss function of the second generator, the first generator and the first discriminator as a teacher generative adversarial network, and take the second generator and the second discriminator as a student generative adversarial network;<br/>
and the objective function determination module of the second generator may be specifically configured to determine the objective function of the second generator according to a distillation objective function between the teacher generative adversarial network and the student generative adversarial network, and the loss function of the second generator.</p>
<p id="p0111" num="0111">In one embodiment, the objective function determination module of the second generator may be specifically configured to sum, according to weights, the distillation objective function and an objective function component determined according to the loss function of the second generator, to determine the objective function of the second generator.<!-- EPO <DP n="23"> --></p>
<p id="p0112" num="0112">In one embodiment, the apparatus further includes:
<ul id="ul0005" list-style="none" compact="compact">
<li>a first similarity metric function determination module that may be configured to determine, before the objective function of the second generator is determined according to the distillation objective function between the teacher generative adversarial network and the student generative adversarial network, and the loss function of the second generator, a first similarity metric function according to a similarity between intermediate feature maps of at least one layer in the first generator and the second generator;</li>
<li>a first intermediate feature map acquisition module that may be configured to input false pictures generated by the first generator into the first discriminator to obtain a first intermediate feature map of at least one layer in the first discriminator;</li>
<li>a second intermediate feature map acquisition module that may be configured to input false pictures generated by the second generator into the first discriminator to obtain a second intermediate feature map of at least one layer in the first discriminator;</li>
<li>a second similarity metric function determination module that may be configured to determine a second similarity metric function according to a similarity between the first intermediate feature map of the at least one layer and the second intermediate feature map of the at least one layer;</li>
<li>and a distillation objective function determination module that may be configured to determine the distillation objective function according to the first similarity metric function and the second similarity metric function.</li>
</ul></p>
<p id="p0113" num="0113">In one embodiment, the first similarity metric function determination module includes:
<ul id="ul0006" list-style="none" compact="compact">
<li>a first sub-similarity metric function determination submodule that may be configured to input an intermediate feature map of an i-th layer in the first generator and an intermediate feature map of an i-th layer in the second generator into a similarity metric function to obtain a first sub-similarity metric function corresponding to the i-th layer, where i is a positive integer, i takes a value from 1 to M, and M is the total number of layers of the first generator and the second generator;</li>
<li>and a first similarity metric function determination submodule that may be configured to determine the first similarity metric function according to first sub-similarity metric functions corresponding to respective layers.</li>
</ul><!-- EPO <DP n="24"> --></p>
<p id="p0114" num="0114">In one embodiment, the second similarity metric function determination module includes:
<ul id="ul0007" list-style="none" compact="compact">
<li>a second sub-similarity metric function determination submodule that may be configured to input a first intermediate feature map and a second intermediate feature map corresponding to a j-th layer into a similarity metric function to obtain a second sub-similarity metric function corresponding to the j-th layer, where j is a positive integer, 1 ≤ j ≤N, j takes a value from 1 to N, and N is the total number of layers of the first discriminator;</li>
<li>and a second similarity metric function determination submodule that may be configured to determine the second similarity metric function according to second sub-similarity metric functions corresponding to respective layers.</li>
</ul></p>
<p id="p0115" num="0115">In one embodiment, the second determination submodule includes:
<ul id="ul0008" list-style="none" compact="compact">
<li>a third determination unit that may be configured to determine the respective retention factors according to an objective function of the respective retention factors;</li>
<li>a fourth determination unit that may be configured to determine a retention factor to be 0 when the retention factor is less than a second preset threshold;</li>
<li>and a fifth determination unit that may be configured to determine a retention factor to be 1 when the retention factor is greater than or equal to the second preset threshold.</li>
</ul></p>
<p id="p0116" num="0116">In one embodiment, the apparatus further includes an objective function determination module for the retention factor, which may be configured to determine, before the respective retention factors are determined according to the objective function of the respective retention factors, the objective function of the respective retention factors according to an objective function of the second generator, an objective function of the second discriminator, a loss function of the second discriminator with respect to false pictures, an objective function of the first generator, and a loss function of the first discriminator with respect to false pictures.</p>
<p id="p0117" num="0117">The apparatus of the present embodiment can execute the method of any of the embodiments in <figref idref="f0001 f0002 f0003">FIG. 1 to FIG.3</figref> described above, whose execution mode and beneficial effects are similar and will not be repeated herein.</p>
<p id="p0118" num="0118">Illustratively, <figref idref="f0004">FIG. 6</figref> is a schematic diagram of a structure of a network model compression device according to an embodiment of the present disclosure. Referring<!-- EPO <DP n="25"> --> specifically to <figref idref="f0004">FIG. 6</figref> below, a schematic diagram of a structure of a network model compression device 600 suitable for implementation in the embodiments of the present disclosure is shown. The network model compression device 600 in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcasting receiver, a personal digital assistant (PDA), a portable Android device (PAD), a portable media player (PMP), a vehicle-mounted terminal (e.g., a vehicle-mounted navigation terminal) or the like, and a fixed terminal such as a digital TV, a desktop computer, or the like. The network model compression device illustrated in <figref idref="f0004">FIG. 6</figref> is merely an example, and should not pose any limitation to the functions and the range of use of the embodiments of the present disclosure.</p>
<p id="p0119" num="0119">As shown in <figref idref="f0004">FIG. 6</figref>, the network model compression device 600 may include a processing apparatus 601 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various suitable actions and processing according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage apparatus 608 into a random-access memory (RAM) 603. The RAM 603 further stores various programs and data required for operations of the network model compression device 600. The processing apparatus 601, the ROM 602, and the RAM 603 are interconnected by means of a bus 604. An input/output (I/O) interface 605 is also connected to the bus 604.</p>
<p id="p0120" num="0120">Usually, the following apparatuses may be connected to the I/O interface 605: an input apparatus 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, or the like; an output apparatus 607 including, for example, a liquid crystal display (LCD), a loudspeaker, a vibrator, or the like; a storage apparatus 608 including, for example, a magnetic tape, a hard disk, or the like; and a communication apparatus 609. The communication apparatus 609 may allow the network model compression device 600 to be in wireless or wired communication with other devices to exchange data. While <figref idref="f0004">FIG. 6</figref> illustrates the network model compression device 600 having various apparatuses, it should be understood that not all of the illustrated apparatuses are necessarily implemented or included. More or fewer apparatuses may be implemented or included alternatively.<!-- EPO <DP n="26"> --></p>
<p id="p0121" num="0121">Particularly, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried by a non-transitory computer-readable medium. The computer program includes program code for performing the methods shown in the flowcharts. In such embodiments, the computer program may be downloaded online through the communication apparatus 609 and installed, or may be installed from the storage apparatus 608, or may be installed from the ROM 602. When the computer program is executed by the processing apparatus 601, the above-mentioned functions defined in the methods of some embodiments of the present disclosure are performed.</p>
<p id="p0122" num="0122">It should be noted that the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. For example, the computer-readable storage medium may be, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of the computer-readable storage medium may include but not be limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random-access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination of them. In the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. In the present disclosure, the computer-readable signal medium may include a data signal that propagates in a baseband or as a part of a carrier and carries computer-readable program code. The data signal propagating in such a manner may take a plurality of forms, including but not limited to an electromagnetic signal, an optical signal, or any appropriate combination thereof. The computer-readable signal medium may also be any other computer-readable medium than the computer-readable storage medium. The computer-readable signal medium may send, propagate or transmit a program used by or in combination with an<!-- EPO <DP n="27"> --> instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted by using any suitable medium, including but not limited to an electric wire, a fiber-optic cable, radio frequency (RF) and the like, or any appropriate combination of them.</p>
<p id="p0123" num="0123">In some implementation modes, the client and the server may communicate with any network protocol currently known or to be researched and developed in the future such as hypertext transfer protocol (HTTP), and may communicate (via a communication network) and interconnect with digital data in any form or medium. Examples of communication networks include a local area network (LAN), a wide area network (WAN), the Internet, and an end-to-end network (e.g., an ad hoc end-to-end network), as well as any network currently known or to be researched and developed in the future.</p>
<p id="p0124" num="0124">The above-mentioned computer-readable medium may be included in the above-mentioned network model compression device, or may also exist alone without being assembled into the network model compression device.</p>
<p id="p0125" num="0125">The computer-readable medium carries one or more programs. The one or more programs, when executed by the network model compression device, cause the network model compression device to: perform pruning processing on the first generator to obtain the second generator; and configure the states of the convolution kernels in the first discriminator to enable a part of the convolution kernels to be in the activated state and the other part of the convolution kernels to be in the suppressed state, so as to obtain the second discriminator, where the loss difference between the first generator and the first discriminator is the first loss difference, the loss difference between the second generator and the second discriminator is the second loss difference, and the absolute value of the difference between the first loss difference and the second loss difference is less than the first preset threshold.</p>
<p id="p0126" num="0126">The computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof. The above-mentioned programming languages include but are not limited to object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code may be executed entirely on the user's<!-- EPO <DP n="28"> --> computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the scenario related to the remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).</p>
<p id="p0127" num="0127">The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, a program segment, or a portion of code, including one or more executable instructions for implementing specified logical functions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur out of the order noted in the accompanying drawings. For example, two blocks shown in succession may, in fact, can be executed substantially concurrently, or the two blocks may sometimes be executed in a reverse order, depending upon the functionality involved. It should also be noted that, each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may also be implemented by a combination of dedicated hardware and computer instructions.</p>
<p id="p0128" num="0128">The modules or units involved in the embodiments of the present disclosure may be implemented in software or hardware. Among them, the name of the module or unit does not constitute a limitation of the unit itself under certain circumstances.</p>
<p id="p0129" num="0129">The functions described herein above may be performed, at least partially, by one or more hardware logic components. For example, without limitation, available exemplary types of hardware logic components include: a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), an application specific standard product (ASSP), a system on chip (SOC), a complex programmable logical device (CPLD), etc.</p>
<p id="p0130" num="0130">In the context of the present disclosure, the machine-readable medium may be a tangible medium that may include or store a program for use by or in combination with an instruction execution system, apparatus or device. The machine-readable medium may be<!-- EPO <DP n="29"> --> a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium includes, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semi-conductive system, apparatus or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage medium include electrical connection with one or more wires, portable computer disk, hard disk, random-access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.</p>
<p id="p0131" num="0131">The embodiments of the present disclosure further provide a computer-readable storage medium storing a computer program. The computer program, when executed by a processor, implements the method of any of the embodiments in <figref idref="f0001 f0002 f0003">FIG. 1 to FIG.3</figref>, whose execution mode and beneficial effects are similar and will not be repeated herein.</p>
<p id="p0132" num="0132">It should be noted that in the present disclosure, relational terms such as "first," "second," etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any actual relationship or order between these entities or operations. Furthermore, the terms "comprise," "comprising," "include," "including," etc., or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a set of elements includes not only those elements, but also other elements not expressly listed, or other elements not expressly listed for the purpose of such a process, method, article or device, or elements that are inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "includes a ..." does not preclude the existence of additional identical elements in the process, method, article or device that includes the element.</p>
</description>
<claims id="claims01" lang="en"><!-- EPO <DP n="30"> -->
<claim id="c-en-01-0001" num="0001">
<claim-text>A computer-implemented image generation method, comprising:
<claim-text>inputting a random noise signal into a second generator to enable the second generator to generate a false image according to the random noise signal (S410); and</claim-text>
<claim-text>inputting the false image into a second discriminator to enable that the second discriminator discriminates that the false image is true and then outputs the false image (S420),</claim-text>
<claim-text>wherein the second generator and the second discriminator are obtained by using a network model compression method, a network model to be compressed comprises a first generator and a first discriminator, <b>characterized in that</b> the network model compression method comprises:</claim-text>
<claim-text>performing pruning processing on the first generator to obtain the second generator (S110) (S210) (S310); and</claim-text>
<claim-text>configuring states of convolution kernels in the first discriminator to enable a part of the convolution kernels to be in an activated state and the other part of the convolution kernels to be in a suppressed state, so as to obtain the second discriminator (S120),</claim-text>
<claim-text>wherein a loss difference between the first generator and the first discriminator is a first loss difference, a loss difference between the second generator and the second discriminator is a second loss difference, and an absolute value of a difference value between the first loss difference and the second loss difference is less than a first preset threshold,</claim-text>
<claim-text>wherein configuring states of convolution kernels in the first discriminator to enable a part of the convolution kernels to be in an activated state and the other part of the convolution kernels to be in a suppressed state, so as to obtain a second discriminator (S120), comprising:
<claim-text>freezing a retention factor corresponding to each convolution kernel in the second discriminator, and determining a first weight parameter of the second discriminator, wherein the retention factor is used for characterizing importance of a convolution kernel corresponding the retention factor (S250);</claim-text>
<claim-text>freezing the first weight parameter of the second discriminator and a second weight parameter of the second generator, and determining respective retention factors (S260); and<!-- EPO <DP n="31"> --></claim-text>
<claim-text>repeatedly performing operations of determining the first weight parameter of the second discriminator and determining the respective retention factors until the absolute value of the difference value between the first loss difference and the second loss difference is less than the first preset threshold,</claim-text></claim-text>
<claim-text>wherein determining the respective retention factors comprises:
<claim-text>determining the respective retention factors according to an objective function of the respective retention factors;</claim-text>
<claim-text>in response to a retention factor being less than a second preset threshold, determining the retention factor to be 0; and</claim-text>
<claim-text>in response to a retention factor being greater than or equal to the second preset threshold, determining the retention factor to be 1 (S370);</claim-text></claim-text>
<claim-text>wherein before determining the respective retention factors according to an objective function of the respective retention factors, the network model compression method further comprises:<br/>
determining the objective function of the respective retention factors according to an objective function of the second generator, an objective function of the second discriminator, a loss function of the second discriminator with respect to false pictures, an objective function of the first generator, and a loss function of the first discriminator with respect to false pictures (S240) (S350).</claim-text></claim-text></claim>
<claim id="c-en-01-0002" num="0002">
<claim-text>The image generation method according to claim 1, wherein the first weight parameter comprises weight parameters corresponding to other elements in the second discriminator other than the respective retention factors.</claim-text></claim>
<claim id="c-en-01-0003" num="0003">
<claim-text>The image generation method according to claim 1, wherein the second weight parameter comprises weight parameters corresponding to elements in the second generator.</claim-text></claim>
<claim id="c-en-01-0004" num="0004">
<claim-text>The image generation method according to claim 1, wherein determining a first weight parameter of the second discriminator comprises:
<claim-text>determining the first weight parameter of the second discriminator according to an objective function of the second discriminator; and<!-- EPO <DP n="32"> --></claim-text>
<claim-text>the network model compression method further comprises:<br/>
determining the second weight parameter of the second generator according to an objective function of the second generator.</claim-text></claim-text></claim>
<claim id="c-en-01-0005" num="0005">
<claim-text>The image generation method according to claim 4, wherein before determining the second weight parameter of the second generator according to an objective function of the second generator, the network model compression method further comprises:
<claim-text>determining the objective function of the second generator according to a loss function of the second generator (S220); and</claim-text>
<claim-text>determining the objective function of the second discriminator according to a loss function of the second discriminator with respect to real pictures and a loss function of the second discriminator with respect to false pictures (S230) (S340).</claim-text></claim-text></claim>
<claim id="c-en-01-0006" num="0006">
<claim-text>The image generation method according to claim 5, wherein before determining the objective function of the second generator according to a loss function of the second generator (S220), the network model compression method further comprises:
<claim-text>taking the first generator and the first discriminator as a teacher generative adversarial network, and taking the second generator and the second discriminator as a student generative adversarial network (S320); and</claim-text>
<claim-text>determining the objective function of the second generator according to a loss function of the second generator (S220) comprises:</claim-text>
<claim-text>determining the objective function of the second generator according to a distillation objective function between the teacher generative adversarial network and the student generative adversarial network, and the loss function of the second generator (S330).</claim-text></claim-text></claim>
<claim id="c-en-01-0007" num="0007">
<claim-text>The image generation method according to claim 6, wherein determining the objective function of the second generator according to a distillation objective function between the teacher generative adversarial network and the student generative adversarial network, and the loss function of the second generator (S330), comprises:<!-- EPO <DP n="33"> -->
<claim-text>summing, according to weights, the distillation objective function and an objective function component determined according to the loss function of the second generator, to determine the objective function of the second generator; and</claim-text>
<claim-text>before determining the objective function of the second generator according to a distillation objective function between the teacher generative adversarial network and the student generative adversarial network, and the loss function of the second generator (S330), the network model compression method further comprises:</claim-text>
<claim-text>determining a first similarity metric function according to a similarity between intermediate feature maps of at least one layer in the first generator and the second generator;</claim-text>
<claim-text>inputting false pictures generated by the first generator into the first discriminator to obtain a first intermediate feature map of at least one layer in the first discriminator;</claim-text>
<claim-text>inputting false pictures generated by the second generator into the first discriminator to obtain a second intermediate feature map of at least one layer in the first discriminator;</claim-text>
<claim-text>determining a second similarity metric function according to a similarity between the first intermediate feature map of the at least one layer and the second intermediate feature map of the at least one layer; and</claim-text>
<claim-text>determining the distillation objective function according to the first similarity metric function and the second similarity metric function.</claim-text></claim-text></claim>
<claim id="c-en-01-0008" num="0008">
<claim-text>The image generation method according to claim 7, wherein determining a first similarity metric function according to a similarity between intermediate feature maps of at least one layer in the first generator and the second generator, comprises:
<claim-text>inputting an intermediate feature map of an i-th layer in the first generator and an intermediate feature map of an i-th layer in the second generator into a similarity metric function to obtain a first sub-similarity metric function corresponding to the i-th layer, wherein i is a positive integer, i takes a value from 1 to M, and M is a total number of layers of the first generator and the second generator; and</claim-text>
<claim-text>determining the first similarity metric function according to first sub-similarity metric functions corresponding to respective layers;<!-- EPO <DP n="34"> --></claim-text>
<claim-text>determining a second similarity metric function according to a similarity between the first intermediate feature map of the at least one layer and the second intermediate feature map of the at least one layer, comprises:</claim-text>
<claim-text>inputting a first intermediate feature map and a second intermediate feature map corresponding to a j-th layer into a similarity metric function to obtain a second sub-similarity metric function corresponding to the j-th layer, wherein j is a positive integer, 1 ≤ j ≤N, j takes a value from 1 to N, and N is a total number of layers of the first discriminator; and</claim-text>
<claim-text>determining the second similarity metric function according to second sub-similarity metric functions corresponding to respective layers.</claim-text></claim-text></claim>
<claim id="c-en-01-0009" num="0009">
<claim-text>An image generation apparatus, comprising:
<claim-text>a second generator, configured to receive a random noise signal to generate a false image according to the random noise signal; and</claim-text>
<claim-text>a second discriminator, configured to receive the false image to discriminate that the false image is true and then output the false image,</claim-text>
<claim-text>wherein the second generator and the second discriminator are obtained by using a network model compression apparatus (500),</claim-text>
<claim-text>a network model to be compressed comprises a first generator and a first discriminator, <b>characterized in that</b> the network model compression apparatus comprises a pruning module (510) and a configuration module (520);</claim-text>
<claim-text>wherein the pruning module (510) is configured to perform pruning processing on the first generator to obtain the second generator;</claim-text>
<claim-text>the configuration module (520) is configured to configure states of convolution kernels in the first discriminator to enable a part of the convolution kernels to be in an activated state and the other part of the convolution kernels to be in a suppressed state, so as to obtain the second discriminator; and</claim-text>
<claim-text>a loss difference between the first generator and the first discriminator is a first loss difference, a loss difference between the second generator and the second discriminator is a second loss difference, and an absolute value of a difference value between the first loss difference and the second loss difference is less than a first preset threshold,<!-- EPO <DP n="35"> --></claim-text>
<claim-text>wherein the configuration module (520) is configured to configure states of convolution kernels in the first discriminator to enable a part of the convolution kernels to be in an activated state and the other part of the convolution kernels to be in a suppressed state, so as to obtain a second discriminator, comprising:
<claim-text>freezing a retention factor corresponding to each convolution kernel in the second discriminator, and determining a first weight parameter of the second discriminator, wherein the retention factor is used for characterizing importance of a convolution kernel corresponding the retention factor (S250);</claim-text>
<claim-text>freezing the first weight parameter of the second discriminator and a second weight parameter of the second generator, and determining respective retention factors (S260); and</claim-text>
<claim-text>repeatedly performing operations of determining the first weight parameter of the second discriminator and determining the respective retention factors until the absolute value of the difference value between the first loss difference and the second loss difference is less than the first preset threshold,</claim-text></claim-text>
<claim-text>wherein determining the respective retention factors comprises:
<claim-text>determining the respective retention factors according to an objective function of the respective retention factors;</claim-text>
<claim-text>in response to a retention factor being less than a second preset threshold, determining the retention factor to be 0; and</claim-text>
<claim-text>in response to a retention factor being greater than or equal to the second preset threshold, determining the retention factor to be 1 (S370);</claim-text></claim-text>
<claim-text>wherein before determining the respective retention factors according to an objective function of the respective retention factors, the network model compression method further comprises:<br/>
determining the objective function of the respective retention factors according to an objective function of the second generator, an objective function of the second discriminator, a loss function of the second discriminator with respect to false pictures, an objective function of the first generator, and a loss function of the first discriminator with respect to false pictures (S240) (S350).</claim-text><!-- EPO <DP n="36"> --></claim-text></claim>
<claim id="c-en-01-0010" num="0010">
<claim-text>An image generation device, comprising:
<claim-text>a memory, storing a computer program; and</claim-text>
<claim-text>a processor, configured to execute the computer program, wherein the computer program, when executed by the processor, causes the processor to perform the image generation method according to any one of claims 1 to 8.</claim-text></claim-text></claim>
<claim id="c-en-01-0011" num="0011">
<claim-text>A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the image generation method according to any one of claims 1 to 8.</claim-text></claim>
<claim id="c-en-01-0012" num="0012">
<claim-text>A computer program product, comprising a computer program carried on a non-transitory computer-readable medium, wherein the computer program comprises program code for performing the network model compression method according to any one of claims 1 to 8.</claim-text></claim>
</claims>
<claims id="claims02" lang="de"><!-- EPO <DP n="37"> -->
<claim id="c-de-01-0001" num="0001">
<claim-text>Computerimplementiertes Bilderzeugungsverfahren, umfassend:
<claim-text>Eingeben eines zufälligen Rauschsignals in einen zweiten Generator, um dem zweiten Generator zu ermöglichen, ein falsches Bild gemäß dem zufälligen Rauschsignal zu erzeugen (S410); und</claim-text>
<claim-text>Eingeben des falschen Bilds in einen zweiten Diskriminator, um zu ermöglichen, dass der zweite Diskriminator ausschließt, dass das falsche Bild echt ist, und dann das falsche Bild ausgibt (S420),</claim-text>
<claim-text>wobei der zweite Generator und der zweite Diskriminator unter Verwendung eines Netzwerkmodellkomprimierungsverfahrens erhalten werden, ein zu komprimierendes Netzwerkmodell einen ersten Generator und einen ersten Diskriminator umfasst, <b>dadurch gekennzeichnet, dass</b> das Netzwerkmodellkomprimierungsverfahren Folgendes umfasst:
<claim-text>Durchführen von Pruning-Verarbeitung an dem ersten Generator, um den zweiten Generator zu erhalten (S110) (S210) (S310); und</claim-text>
<claim-text>Konfigurieren von Zuständen von Faltungskernen im ersten Diskriminator, um einem Teil der Faltungskerne zu ermöglichen, sich in einem aktivierten Zustand zu befinden, und dem anderen Teil der Faltungskerne zu ermöglichen, sich in einem unterdrückten Zustand zu befinden, um den zweiten Diskriminator (S120) zu erhalten,</claim-text></claim-text>
<claim-text>wobei eine Verlustdifferenz zwischen dem ersten Generator und dem ersten Diskriminator eine erste Verlustdifferenz ist, eine Verlustdifferenz zwischen dem zweiten Generator und dem zweiten Diskriminator eine zweite Verlustdifferenz ist und ein Absolutwert eines Differenzwerts zwischen der ersten Verlustdifferenz und der zweiten Verlustdifferenz kleiner als ein erster voreingestellter Schwellenwert ist,</claim-text>
<claim-text>wobei Konfigurieren von Zuständen von Faltungskerne im ersten Diskriminator, um einem Teil der Faltungskerne zu ermöglichen, sich in einem aktivierten Zustand zu befinden, und dem anderen Teil der Faltungskerne zu ermöglichen, sich in einem unterdrückten Zustand zu befinden, um einen zweiten Diskriminator (S120) zu erhalten, Folgendes umfasst:
<claim-text>Einfrieren eines Retentionsfaktors, der jedem Faltungskern im zweiten Diskriminator entspricht, und Bestimmen eines ersten Gewichtungsparameters des zweiten Diskriminators, wobei der Retentionsfaktor verwendet wird, um eine Wichtigkeit eines Faltungskerns entsprechend dem Retentionsfaktor zu charakterisieren (S250);<!-- EPO <DP n="38"> --></claim-text>
<claim-text>Einfrieren des ersten Gewichtungsparameters des zweiten Diskriminators und eines zweiten Gewichtungsparameters des zweiten Generators, und Bestimmen jeweiliger Retentionsfaktoren (S260); und</claim-text>
<claim-text>wiederholtes Durchführen von Operationen zum Bestimmen des ersten Gewichtungsparameters des zweiten Diskriminators und Bestimmen der jeweiligen Retentionsfaktoren, bis der Absolutwert des Differenzwerts zwischen der ersten Verlustdifferenz und der zweiten Verlustdifferenz kleiner als der erste voreingestellte Schwellenwert ist,</claim-text></claim-text>
<claim-text>wobei Bestimmen der jeweiligen Retentionsfaktoren Folgendes umfasst:
<claim-text>Bestimmen der jeweiligen Retentionsfaktoren gemäß einer Zielfunktion der jeweiligen Retentionsfaktoren;</claim-text>
<claim-text>infolgedessen, dass ein Retentionsfaktor kleiner als ein zweiter voreingestellter Schwellenwert ist, Bestimmen des Retentionsfaktor als 0; und</claim-text>
<claim-text>infolgedessen, dass ein Retentionsfaktor größer oder gleich einem zweiten voreingestellten Schwellenwert ist, Bestimmen des Retentionsfaktor als 1 (S370);</claim-text></claim-text>
<claim-text>wobei vor dem Bestimmen der jeweiligen Retentionsfaktoren gemäß einer Zielfunktion der jeweiligen Retentionsfaktoren, das Netzwerkmodellkomprimierungsverfahren ferner Folgendes umfasst:<br/>
Bestimmen der Zielfunktion der jeweiligen Retentionsfaktoren gemäß einer Zielfunktion des zweiten Generators, einer Zielfunktion des zweiten Diskriminators, einer Verlustfunktion des zweiten Diskriminators in Bezug auf falsche Bilder, einer Zielfunktion des ersten Generators und einer Verlustfunktion des ersten Diskriminators in Bezug auf falsche Bilder (S240) (S350).</claim-text></claim-text></claim>
<claim id="c-de-01-0002" num="0002">
<claim-text>Bilderzeugungsverfahren nach Anspruch 1, wobei der erste Gewichtungsparameter Gewichtungsparameter umfasst, die anderen Elementen im zweiten Diskriminator als den jeweiligen Retentionsfaktoren entsprechen.</claim-text></claim>
<claim id="c-de-01-0003" num="0003">
<claim-text>Bilderzeugungsverfahren nach Anspruch 1, wobei der zweite Gewichtungsparameter Gewichtungsparameter umfasst, die Elementen im zweiten Generator entsprechen.<!-- EPO <DP n="39"> --></claim-text></claim>
<claim id="c-de-01-0004" num="0004">
<claim-text>Bilderzeugungsverfahren nach Anspruch 1, wobei Bestimmen eines ersten Gewichtungsparameters des zweiten Diskriminators Folgendes umfasst:
<claim-text>Bestimmen des ersten Gewichtungsparameters des zweiten Diskriminators gemäß einer Zielfunktion des zweiten Diskriminators; und</claim-text>
<claim-text>wobei das Netzwerkmodellkomprimierungsverfahren ferner Folgendes umfasst:<br/>
Bestimmen des zweiten Gewichtungsparameters des zweiten Generators gemäß einer Zielfunktion des zweiten Generators.</claim-text></claim-text></claim>
<claim id="c-de-01-0005" num="0005">
<claim-text>Bilderzeugungsverfahren nach Anspruch 4, wobei vor Bestimmen des zweiten Gewichtungsparameters des zweiten Generators gemäß einer Zielfunktion des zweiten Generators das Netzwerkmodellkomprimierungsverfahren ferner Folgendes umfasst:
<claim-text>Bestimmen der Zielfunktion des zweiten Generators gemäß einer Verlustfunktion des zweiten Generators (S220); und</claim-text>
<claim-text>Bestimmen der Zielfunktion des zweiten Diskriminators gemäß einer Verlustfunktion des zweiten Diskriminators in Bezug auf reale Bilder und einer Verlustfunktion des zweiten Diskriminators in Bezug auf falsche Bilder (S230) (S340).</claim-text></claim-text></claim>
<claim id="c-de-01-0006" num="0006">
<claim-text>Bilderzeugungsverfahren nach Anspruch 5, wobei vor Bestimmen der Zielfunktion des zweiten Generators gemäß einer Verlustfunktion des zweiten Generators (S220), das Netzwerkmodellkomprimierungsverfahren ferner Folgendes umfasst:
<claim-text>Heranziehen des ersten Generators und des ersten Diskriminators als ein generatives adversariales Lehrernetzwerk, und Heranziehen des zweiten Generators und des zweiten Diskriminators als ein generatives adversariales Schülernetzwerk (S320); und</claim-text>
<claim-text>wobei Bestimmen der Zielfunktion des zweiten Generators gemäß einer Verlustfunktion des zweiten Generators (S220) Folgendes umfasst:<br/>
Bestimmen der Zielfunktion des zweiten Generators gemäß einer Destillationszielfunktion zwischen dem generativen adversarialen Lehrernetzwerk und dem generativen adversarialen Schülernetzwerk und der Verlustfunktion des zweiten Generators (S330).</claim-text></claim-text></claim>
<claim id="c-de-01-0007" num="0007">
<claim-text>Bilderzeugungsverfahren nach Anspruch 6, wobei Bestimmen der Zielfunktion des zweiten Generators gemäß einer Destillationszielfunktion zwischen dem generativen<!-- EPO <DP n="40"> --> adversarialen Lehrernetzwerk und dem generativen adversarialen Schülernetzwerk und der Verlustfunktion des zweiten Generators (S330), Folgendes umfasst:
<claim-text>Summieren, gemäß Gewichten, der Destillationszielfunktion und einer gemäß der Verlustfunktion des zweiten Generators bestimmten Zielfunktionskomponente, um die Zielfunktion des zweiten Generators zu bestimmen; und</claim-text>
<claim-text>wobei vor Bestimmen der Zielfunktion des zweiten Generators gemäß einer Destillationszielfunktion zwischen dem generativen adversarialen Lehrernetzwerk und dem generativen adversarialen Schülernetzwerk und der Verlustfunktion des zweiten Generators (S330), das Netzwerkmodellkomprimierungsverfahren ferner Folgendes umfasst:
<claim-text>Bestimmen einer ersten Ähnlichkeitsmetrikfunktion gemäß einer Ähnlichkeit zwischen Zwischenmerkmalskarten von mindestens einer Schicht in dem ersten Generator und dem zweiten Generator;</claim-text>
<claim-text>Eingeben von falschen Bildern, die vom ersten Generator erzeugt wurden, in den ersten Diskriminator, um eine erste Zwischenmerkmalskarte von mindestens einer Schicht im ersten Diskriminator zu erhalten;</claim-text>
<claim-text>Eingeben von falschen Bildern, die vom zweiten Generator erzeugt wurden, in den ersten Diskriminator, um eine zweite Zwischenmerkmalskarte von mindestens einer Schicht im ersten Diskriminator zu erhalten;</claim-text>
<claim-text>Bestimmen einer zweiten Ähnlichkeitsmetrikfunktion gemäß einer Ähnlichkeit zwischen der ersten Zwischenmerkmalskarte der mindestens einen Schicht und der zweiten Zwischenmerkmalskarte der mindestens einen Schicht; und</claim-text>
<claim-text>Bestimmen der Destillationszielfunktion gemäß der ersten Ähnlichkeitsmetrikfunktion und der zweiten Ähnlichkeitsmetrikfunktion.</claim-text></claim-text></claim-text></claim>
<claim id="c-de-01-0008" num="0008">
<claim-text>Bilderzeugungsverfahren nach Anspruch 7, wobei Bestimmen einer ersten Ähnlichkeitsmetrikfunktion gemäß einer Ähnlichkeit zwischen Zwischenmerkmalskarten von mindestens einer Schicht in dem ersten Generator und dem zweiten Generator, Folgendes umfasst:
<claim-text>Eingeben einer Zwischenmerkmalskarte einer i-ten Schicht im ersten Generator und einer Zwischenmerkmalskarte einer i-ten Schicht im zweiten Generator in eine Ähnlichkeitsmetrikfunktion, um eine erste Teilähnlichkeitsmetrikfunktion entsprechend der i-ten Schicht zu erhalten, wobei i eine positive ganze Zahl ist, i einen Wert von 1 bis M<!-- EPO <DP n="41"> --> annimmt und M eine Gesamtzahl von Schichten des ersten Generators und des zweiten Generators ist; und</claim-text>
<claim-text>Bestimmen der ersten Ähnlichkeitsmetrikfunktion gemäß der ersten Teilähnlichkeitsmetrikfunktionen, die den jeweiligen Schichten entsprechen;</claim-text>
<claim-text>wobei Bestimmen einer zweiten Ähnlichkeitsmetrikfunktion gemäß einer Ähnlichkeit zwischen der ersten Zwischenmerkmalskarte der mindestens einen Schicht und der zweiten Zwischenmerkmalskarte der mindestens einen Schicht, Folgendes umfasst:
<claim-text>Eingeben einer ersten Zwischenmerkmalskarte und einer zweiten Zwischenmerkmalskarte entsprechend einer j-ten Schicht in eine Ähnlichkeitsmetrikfunktion, um eine zweite Teilähnlichkeitsmetrikfunktion entsprechend der j-ten Schicht zu erhalten, wobei j eine positive ganze Zahl ist, 1 ≤ j ≤N, i einen Wert von 1 bis N annimmt und N eine Gesamtzahl von Schichten des ersten Diskriminators ist; und</claim-text>
<claim-text>Bestimmen der zweiten Ähnlichkeitsmetrikfunktion gemäß der zweiten Teilähnlichkeitsmetrikfunktionen, die den jeweiligen Schichten entsprechen.</claim-text></claim-text></claim-text></claim>
<claim id="c-de-01-0009" num="0009">
<claim-text>Bilderzeugungseinrichtung, umfassend:
<claim-text>einen zweiten Generator, um dem zweiten Generator, der dazu konfiguriert ist, ein zufälliges Rauschsignal zu empfangen, um ein falsches Bild gemäß dem zufälligen Rauschsignal zu erzeugen; und</claim-text>
<claim-text>einen zweiten Diskriminator, der dazu konfiguriert ist, das falsche Bild zu empfangen, um auszuschließen, dass das falsche Bild echt ist, und dann das falsche Bild auszugeben,</claim-text>
<claim-text>wobei der zweite Generator und der zweite Diskriminator durch Verwendung einer Netzwerkmodell-Kompressionseinrichtung (500) erhalten werden,</claim-text>
<claim-text>wobei ein zu komprimierendes Netzwerkmodell einen ersten Generator und einen ersten Diskriminator umfasst, <b>dadurch gekennzeichnet, dass</b> die Netzwerkmodellkomprimierungseinrichtung ein Pruning-Modul (510) und ein Konfigurationsmodul (520) umfasst;</claim-text>
<claim-text>wobei das Pruning-Modul (510) dazu konfiguriert ist, einen Pruning-Prozess am ersten Generator durchzuführen, um den zweiten Generator zu erhalten;<!-- EPO <DP n="42"> --></claim-text>
<claim-text>das Konfigurationsmodul (520) dazu konfiguriert ist, Zustände von Faltungskernen im ersten Diskriminator zu konfigurieren, um einem Teil der Faltungskerne zu ermöglichen, sich in einem aktivierten Zustand zu befinden, und dem anderen Teil der Faltungskerne zu ermöglichen, sich in einem unterdrückten Zustand zu befinden, um den zweiten Diskriminator zu erhalten; und</claim-text>
<claim-text>eine Verlustdifferenz zwischen dem ersten Generator und dem ersten Diskriminator eine erste Verlustdifferenz ist, eine Verlustdifferenz zwischen dem zweiten Generator und dem zweiten Diskriminator eine zweite Verlustdifferenz ist und ein Absolutwert eines Differenzwerts zwischen der ersten Verlustdifferenz und der zweiten Verlustdifferenz kleiner als ein erster voreingestellter Schwellenwert ist,</claim-text>
<claim-text>wobei das Konfigurationsmodul (520) dazu konfiguriert ist, Zustände von Faltungskernen im ersten Diskriminator zu konfigurieren, um einem Teil der Faltungskerne zu ermöglichen, sich in einem aktivierten Zustand zu befinden, und dem anderen Teil der Faltungskerne zu ermöglichen, sich in einem unterdrückten Zustand zu befinden, um einen zweiten Diskriminator zu erhalten, Folgendes umfasst:
<claim-text>Einfrieren eines Retentionsfaktors, der jedem Faltungskern im zweiten Diskriminator entspricht, und Bestimmen eines ersten Gewichtungsparameters des zweiten Diskriminators, wobei der Retentionsfaktor verwendet wird, um eine Wichtigkeit eines Faltungskerns entsprechend dem Retentionsfaktor zu charakterisieren (S250);</claim-text>
<claim-text>Einfrieren des ersten Gewichtungsparameters des zweiten Diskriminators und eines zweiten Gewichtungsparameters des zweiten Generators, und Bestimmen jeweiliger Retentionsfaktoren (S260); und</claim-text>
<claim-text>wiederholtes Durchführen von Operationen zum Bestimmen des ersten Gewichtungsparameters des zweiten Diskriminators und Bestimmen der jeweiligen Retentionsfaktoren, bis der Absolutwert des Differenzwerts zwischen der ersten Verlustdifferenz und der zweiten Verlustdifferenz kleiner als der erste voreingestellte Schwellenwert ist,</claim-text></claim-text>
<claim-text>wobei Bestimmen der jeweiligen Retentionsfaktoren Folgendes umfasst:
<claim-text>Bestimmen der jeweiligen Retentionsfaktoren gemäß einer Zielfunktion der jeweiligen Retentionsfaktoren;</claim-text>
<claim-text>infolgedessen, dass ein Retentionsfaktor kleiner als ein zweiter voreingestellter Schwellenwert ist, Bestimmen des Retentionsfaktor als 0; und<!-- EPO <DP n="43"> --></claim-text>
<claim-text>infolgedessen, dass ein Retentionsfaktor größer oder gleich einem zweiten voreingestellten Schwellenwert ist, Bestimmen des Retentionsfaktor als 1 (S370);</claim-text></claim-text>
<claim-text>wobei vor dem Bestimmen der jeweiligen Retentionsfaktoren gemäß einer Zielfunktion der jeweiligen Retentionsfaktoren, das Netzwerkmodellkomprimierungsverfahren ferner Folgendes umfasst:<br/>
Bestimmen der Zielfunktion der jeweiligen Retentionsfaktoren gemäß einer Zielfunktion des zweiten Generators, einer Zielfunktion des zweiten Diskriminators, einer Verlustfunktion des zweiten Diskriminators in Bezug auf falsche Bilder, einer Zielfunktion des ersten Generators und einer Verlustfunktion des ersten Diskriminators in Bezug auf falsche Bilder (S240) (S350).</claim-text></claim-text></claim>
<claim id="c-de-01-0010" num="0010">
<claim-text>Bilderzeugungsvorrichtung, umfassend:
<claim-text>einen Speicher, der ein Computerprogramm speichert; und</claim-text>
<claim-text>einen Prozessor, der dazu konfiguriert ist, das Computerprogramm auszuführen, wobei das Computerprogramm, wenn es vom Prozessor ausgeführt wird, den Prozessor veranlässt, das Bilderzeugungsverfahren nach einem der Ansprüche 1 bis 8 durchzuführen.</claim-text></claim-text></claim>
<claim id="c-de-01-0011" num="0011">
<claim-text>Computerlesbares Speichermedium, das ein Computerprogramm darauf speichert, wobei das Computerprogramm, wenn es von einem Prozessor ausgeführt wird, das Bilderzeugungsverfahren nach einem der Ansprüche 1 bis 8 implementiert.</claim-text></claim>
<claim id="c-de-01-0012" num="0012">
<claim-text>Computerprogrammprodukt, umfassend ein Computerprogramm, das auf einem nichtflüchtigen computerlesbaren Medium gespeichert ist, wobei das Computerprogramm Programmcode zum Durchführen des Netzwerkmodellkomprimierungsverfahrens nach einem der Ansprüche 1 bis 8 umfasst.</claim-text></claim>
</claims>
<claims id="claims03" lang="fr"><!-- EPO <DP n="44"> -->
<claim id="c-fr-01-0001" num="0001">
<claim-text>Procédé de génération d'image mis en œuvre par ordinateur, comprenant :
<claim-text>l'entrée d'un signal de bruit aléatoire dans un second générateur pour permettre au second générateur de générer une fausse image selon le signal de bruit aléatoire (S410) ; et</claim-text>
<claim-text>l'entrer de la fausse image dans un second discriminateur pour permettre au second discriminateur de discriminer que la fausse image est vraie, puis émet la fausse image (S420),</claim-text>
<claim-text>dans lequel le second générateur et le second discriminateur sont obtenus par un procédé de compression de modèle de réseau, le modèle de réseau à compresser comprend un premier générateur et un premier discriminateur, <b>caractérisé en ce que</b> le procédé de compression de modèle de réseau comprend :
<claim-text>la réalisation d'un traitement d'élagage sur le premier générateur pour obtenir le second générateur (S110) (S210) (S310) ; et</claim-text>
<claim-text>la configuration d'états de noyaux de convolution dans le premier discriminateur pour permettre à une partie des noyaux de convolution d'être dans un état activé et à l'autre partie des noyaux de convolution d'être dans un état supprimé, de manière à obtenir le second discriminateur (S120),</claim-text></claim-text>
<claim-text>dans lequel une différence de perte entre le premier générateur et le premier discriminateur est une première différence de perte, une différence de perte entre le second générateur et le second discriminateur est une seconde différence de perte, et une valeur absolue d'une valeur de différence entre la première différence de perte et la seconde différence de perte est inférieure à un premier seuil prédéfini,</claim-text>
<claim-text>dans lequel la configuration d'états de noyaux de convolution dans le premier discriminateur pour permettre à une partie des noyaux de convolution d'être dans un état activé et à l'autre partie des noyaux de convolution d'être dans un état supprimé, de manière à obtenir un second discriminateur (S120), comprend :
<claim-text>le gel d'un facteur de rétention correspondant à chaque noyau de convolution dans le second discriminateur, et la détermination d'un premier paramètre de poids du second discriminateur, dans lequel le facteur de rétention est utilisé pour la caractérisation de l'importance d'un noyau de convolution correspondant au facteur de rétention (S250) ;<!-- EPO <DP n="45"> --></claim-text>
<claim-text>le gel du premier paramètre de poids du second discriminateur et d'un second paramètre de poids du second générateur, et la détermination de facteurs de rétention respectifs (S260) ; et</claim-text>
<claim-text>la réalisation de manière répétée d'opérations de détermination du premier paramètre de poids du second discriminateur et la détermination des facteurs de rétention respectifs jusqu'à ce que la valeur absolue de la valeur de différence entre la première différence de perte et la seconde différence de perte soit inférieure au premier seuil prédéfini,</claim-text></claim-text>
<claim-text>dans lequel la détermination des facteurs de rétention respectifs comprend :
<claim-text>la détermination des facteurs de rétention respectifs selon une fonction objective des facteurs de rétention respectifs ;</claim-text>
<claim-text>en réponse à un facteur de rétention étant inférieur à un second seuil prédéfini, la détermination que le facteur de rétention est de 0 ; et</claim-text>
<claim-text>en réponse à un facteur de rétention étant supérieur ou égal au second seuil prédéfini, la détermination que le facteur de rétention est de 1 (S370) ;</claim-text></claim-text>
<claim-text>dans lequel, avant la détermination des facteurs de rétention respectifs selon une fonction objective des facteurs de rétention respectifs, le procédé de compression de modèle de réseau comprend en outre :<br/>
la détermination de la fonction objective des facteurs de rétention respectifs selon une fonction objective du second générateur, une fonction objective du second discriminateur, une fonction de perte du second discriminateur par rapport à de fausses images, une fonction objective du premier générateur et une fonction de perte du premier discriminateur par rapport à de fausses images (S240) (S350).</claim-text></claim-text></claim>
<claim id="c-fr-01-0002" num="0002">
<claim-text>Procédé de génération d'image selon la revendication 1, dans lequel le premier paramètre de poids comprend des paramètres de poids correspondant à d'autres éléments dans le second discriminateur autres que les facteurs de rétention respectifs.</claim-text></claim>
<claim id="c-fr-01-0003" num="0003">
<claim-text>Procédé de génération d'image selon la revendication 1, dans lequel le second paramètre de poids comprend des paramètres de poids correspondant à des éléments dans le second générateur.<!-- EPO <DP n="46"> --></claim-text></claim>
<claim id="c-fr-01-0004" num="0004">
<claim-text>Procédé de génération d'image selon la revendication 1, dans lequel la détermination d'un premier paramètre de poids du second discriminateur comprend :
<claim-text>la détermination du premier paramètre de poids du second discriminateur selon une fonction objective du second discriminateur ; et</claim-text>
<claim-text>le procédé de compression de modèle de réseau comprend en outre :<br/>
la détermination du second paramètre de poids du second générateur selon une fonction objective du second générateur.</claim-text></claim-text></claim>
<claim id="c-fr-01-0005" num="0005">
<claim-text>Procédé de génération d'image selon la revendication 4, dans lequel, avant la détermination du second paramètre de poids du second générateur selon une fonction objective du second générateur, le procédé de compression de modèle de réseau comprend en outre :
<claim-text>la détermination de la fonction objective du second générateur selon une fonction de perte du second générateur (S220) ; et</claim-text>
<claim-text>la détermination de la fonction objective du second discriminateur selon une fonction de perte du second discriminateur par rapport à des images réelles et une fonction de perte du second discriminateur par rapport à de fausses images (S230) (S340).</claim-text></claim-text></claim>
<claim id="c-fr-01-0006" num="0006">
<claim-text>Procédé de génération d'image selon la revendication 5, dans lequel, avant la détermination de la fonction objective du second générateur selon une fonction de perte du second générateur (S220), le procédé de compression de modèle de réseau comprend en outre :
<claim-text>la prise du premier générateur et du premier discriminateur comme un réseau antagoniste génératif d'enseignant, et la prise du second générateur et du second discriminateur comme un réseau antagoniste génératif d'étudiant (S320) ; et</claim-text>
<claim-text>la détermination de la fonction objective du second générateur selon une fonction de perte du second générateur (S220) comprend :<br/>
la détermination de la fonction objective du second générateur selon une fonction objective de distillation entre le réseau antagoniste génératif d'enseignant et le réseau antagoniste génératif d'étudiant, et la fonction de perte du second générateur (S330).</claim-text><!-- EPO <DP n="47"> --></claim-text></claim>
<claim id="c-fr-01-0007" num="0007">
<claim-text>Procédé de génération d'image selon la revendication 6, dans lequel la détermination de la fonction objective du second générateur selon une fonction objective de distillation entre le réseau antagoniste génératif d'enseignant et le réseau antagoniste génératif d'étudiant, et la fonction de perte du second générateur (S330), comprend :
<claim-text>l'addition, selon des poids, de la fonction objective de distillation et d'une composante de fonction objective déterminée selon la fonction de perte du second générateur, pour déterminer la fonction objective du second générateur; et</claim-text>
<claim-text>avant la détermination de la fonction objective du second générateur selon une fonction objective de distillation entre le réseau antagoniste génératif d'enseignant et le réseau antagoniste génératif d'étudiant, et la fonction de perte du second générateur (S330), le procédé de compression de modèle de réseau comprend en outre :
<claim-text>la détermination d'une première fonction métrique de similarité selon une similarité entre des cartes de caractéristique intermédiaires d'au moins une couche du premier générateur et du second générateur ;</claim-text>
<claim-text>l'entrée de fausses images générées par le premier générateur dans le premier discriminateur pour obtenir une première carte de caractéristique intermédiaire d'au moins une couche dans le premier discriminateur ;</claim-text>
<claim-text>l'entrée de fausses images générées par le second générateur dans le premier discriminateur pour obtenir une seconde carte de caractéristique intermédiaire d'au moins une couche dans le premier discriminateur ;</claim-text>
<claim-text>la détermination d'une seconde fonction métrique de similarité selon une similarité entre la première carte de caractéristique intermédiaire de l'au moins une couche et la seconde carte de caractéristique intermédiaire de l'au moins une couche ; et</claim-text>
<claim-text>déterminer la fonction objective de distillation selon la première fonction métrique de similarité et la seconde fonction métrique de similarité.</claim-text></claim-text></claim-text></claim>
<claim id="c-fr-01-0008" num="0008">
<claim-text>Procédé de génération d'image selon la revendication 7, dans lequel la détermination d'une première fonction métrique de similarité selon une similarité entre des cartes de caractéristique intermédiaires d'au moins une couche du premier générateur et du second générateur comprend :
<claim-text>l'entrée d'une carte de caractéristique intermédiaire d'une ie couche du premier générateur et une carte de caractéristique intermédiaire d'une ie couche du second générateur dans une fonction métrique de similarité pour obtenir une première fonction<!-- EPO <DP n="48"> --> métrique de sous-similarité correspondant à la ie couche, dans lequel i est un entier positif, i prend une valeur de 1 à M, et M est un nombre total de couches du premier générateur et du second générateur ; et</claim-text>
<claim-text>la détermination de la première fonction métrique de similarité selon de premières fonctions métriques de sous-similarité correspondant à des couches respectives ;</claim-text>
<claim-text>la détermination d'une seconde fonction métrique de similarité selon une similarité entre la première carte de caractéristique intermédiaire de l'au moins une couche et la seconde carte de caractéristique intermédiaire de l'au moins une couche comprend :
<claim-text>l'entrée d'une première carte de caractéristique intermédiaire et d'une seconde carte de caractéristique intermédiaire correspondant à une je couche dans une fonction métrique de similarité pour obtenir une seconde fonction métrique de sous-similarité correspondant à la je couche, dans lequel j est un entier positif, 1 ≤ j ≤ N, j prend une valeur de 1 à N, et N est un nombre total de couches du premier discriminateur ; et</claim-text>
<claim-text>la détermination de la seconde fonction métrique de similarité selon de secondes fonctions métriques de sous-similarité correspondant à des couches respectives.</claim-text></claim-text></claim-text></claim>
<claim id="c-fr-01-0009" num="0009">
<claim-text>Appareil de génération d'image, comprenant :
<claim-text>un second générateur, configuré pour recevoir un signal de bruit aléatoire pour générer une fausse image selon le signal de bruit aléatoire ; et</claim-text>
<claim-text>un second discriminateur, configuré pour recevoir la fausse image pour discriminer que la fausse image est vraie, puis émettre la fausse image,</claim-text>
<claim-text>dans lequel le second générateur et le second discriminateur sont obtenus en utilisant un appareil de compression de modèle de réseau (500),</claim-text>
<claim-text>un modèle de réseau à compresser comprend un premier générateur et un premier discriminateur, <b>caractérisé en ce que</b> l'appareil de compression de modèle de réseau comprend un module d'élagage (510) et un module de configuration (520) ;</claim-text>
<claim-text>dans lequel le module d'élagage (510) est configuré pour réaliser un traitement d'élagage sur le premier générateur pour obtenir le second générateur ;</claim-text>
<claim-text>le module de configuration (520) est configuré pour configurer des états de noyaux de convolution dans le premier discriminateur pour permettre à une partie des noyaux de convolution d'être dans un état activé et à l'autre partie des noyaux de convolution d'être dans un état supprimé, de manière à obtenir le second discriminateur ; et<!-- EPO <DP n="49"> --></claim-text>
<claim-text>une différence de perte entre le premier générateur et le premier discriminateur est une première différence de perte, une différence de perte entre le second générateur et le second discriminateur est une seconde différence de perte, et une valeur absolue d'une valeur de différence entre la première différence de perte et la seconde différence de perte est inférieure à un premier seuil prédéfini,</claim-text>
<claim-text>dans lequel le module de configuration (520) est configuré pour configurer des états de noyaux de convolution dans le premier discriminateur pour permettre à une partie des noyaux de convolution d'être dans un état activé et à l'autre partie des noyaux de convolution d'être dans un état supprimé, de manière à obtenir un second discriminateur, comprenant :
<claim-text>le gel d'un facteur de rétention correspondant à chaque noyau de convolution dans le second discriminateur, et la détermination d'un premier paramètre de poids du second discriminateur, dans lequel le facteur de rétention est utilisé pour la caractérisation de l'importance d'un noyau de convolution correspondant au facteur de rétention (S250) ;</claim-text>
<claim-text>le gel du premier paramètre de poids du second discriminateur et d'un second paramètre de poids du second générateur, et la détermination de facteurs de rétention respectifs (S260) ; et</claim-text>
<claim-text>la réalisation de manière répétée d'opérations de détermination du premier paramètre de poids du second discriminateur et la détermination des facteurs de rétention respectifs jusqu'à ce que la valeur absolue de la valeur de différence entre la première différence de perte et la seconde différence de perte soit inférieure au premier seuil prédéfini,</claim-text></claim-text>
<claim-text>dans lequel la détermination des facteurs de rétention respectifs comprend :
<claim-text>la détermination des facteurs de rétention respectifs selon une fonction objective des facteurs de rétention respectifs ;</claim-text>
<claim-text>en réponse à un facteur de rétention étant inférieur à un second seuil prédéfini, la détermination que le facteur de rétention est de 0 ; et</claim-text>
<claim-text>en réponse à un facteur de rétention étant supérieur ou égal au second seuil prédéfini, la détermination que le facteur de rétention est de 1 (S370) ;</claim-text></claim-text>
<claim-text>dans lequel, avant la détermination des facteurs de rétention respectifs selon une fonction objective des facteurs de rétention respectifs, le procédé de compression de modèle de réseau comprend en outre :<br/>
<!-- EPO <DP n="50"> -->la détermination de la fonction objective des facteurs de rétention respectifs selon une fonction objective du second générateur, une fonction objective du second discriminateur, une fonction de perte du second discriminateur par rapport à de fausses images, une fonction objective du premier générateur et une fonction de perte du premier discriminateur par rapport à de fausses images (S240) (S350).</claim-text></claim-text></claim>
<claim id="c-fr-01-0010" num="0010">
<claim-text>Dispositif de génération d'image, comprenant :
<claim-text>une mémoire, stockant un programme informatique ; et</claim-text>
<claim-text>un processeur, configuré pour exécuter le programme informatique, dans lequel le programme informatique, lorsqu'il est exécuté par le processeur, amène le processeur à réaliser le procédé de génération d'image selon l'une quelconque des revendications 1 à 8.</claim-text></claim-text></claim>
<claim id="c-fr-01-0011" num="0011">
<claim-text>Support de stockage lisible par ordinateur stockant un programme informatique, dans lequel le programme informatique, lorsqu'il est exécuté par un processeur, met en œuvre le procédé de génération d'image selon l'une quelconque des revendications 1 à 8.</claim-text></claim>
<claim id="c-fr-01-0012" num="0012">
<claim-text>Produit de programme informatique, comprenant un programme informatique porté sur support lisible par ordinateur non transitoire, dans lequel le programme informatique comprend du code de programme pour réaliser le procédé de compression de modèle de réseau selon l'une quelconque des revendications 1 à 8.</claim-text></claim>
</claims>
<drawings id="draw" lang="en"><!-- EPO <DP n="51"> -->
<figure id="f0001" num="1"><img id="if0001" file="imgf0001.tif" wi="131" he="61" img-content="drawing" img-format="tif"/></figure><!-- EPO <DP n="52"> -->
<figure id="f0002" num="2"><img id="if0002" file="imgf0002.tif" wi="129" he="220" img-content="drawing" img-format="tif"/></figure><!-- EPO <DP n="53"> -->
<figure id="f0003" num="3"><img id="if0003" file="imgf0003.tif" wi="111" he="224" img-content="drawing" img-format="tif"/></figure><!-- EPO <DP n="54"> -->
<figure id="f0004" num="4,5,6"><img id="if0004" file="imgf0004.tif" wi="156" he="214" img-content="drawing" img-format="tif"/></figure>
</drawings>
</ep-patent-document>
