Neural network operation methods, devices and storage media

By adding a random mask layer and performing tensor transformation on the neural network, the problems of training complexity and storage overhead caused by the increase of neural network dimension are solved, and low-complexity and low-overhead neural network deployment and online training are realized.

CN116366401BActive Publication Date: 2026-05-26DATANG MOBILE COMM EQUIP CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DATANG MOBILE COMM EQUIP CO LTD
Filing Date
2022-01-13
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing technologies, the number of neural networks increases with the possible increase in dimensionality, resulting in high model training complexity and large storage overhead, which is not conducive to practical deployment and continuous evolution of online learning.

Method used

By adding a random mask layer to the neural network, the input tensor is processed by random masking, and the network is trained using sample data. Then, the random mask layer is replaced with a tensor transformation layer to adapt to the requirements of different input and output dimensions.

Benefits of technology

It enables the adaptation to different input and output dimension requirements by only training and deploying a single neural network, reducing training complexity and storage overhead, and facilitating deployment and continuous evolution through online training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366401B_ABST
    Figure CN116366401B_ABST
Patent Text Reader

Abstract

This application provides a neural network operation method, apparatus, and storage medium, including: adding a random mask layer to a first neural network according to the type of variable dimensions to obtain a second neural network; the random mask layer is used to perform random masking processing on tensors input to the random mask layer; and training the second neural network using sample data. The neural network operation method, apparatus, and storage medium provided in this application, by adding a random mask layer to the neural network, only require training and deployment of one neural network to adapt to different input and output dimension requirements. This method has low training complexity, low storage overhead, and is easy to deploy and continuously evolve through online training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a neural network operation method, apparatus and storage medium. Background Technology

[0002] When the input dimension (due to the collection of partial data resulting in different input dimensions) and / or output dimension of a neural network are uncertain, it is necessary to train a separate neural network for all possible input dimensions and / or output dimensions to cope with different dimensions and task requirements.

[0003] Figure 1 This is a schematic diagram illustrating the principle of training methods for variable-dimensional neural networks in existing technologies, such as... Figure 1 As shown, a feasible solution is to train a separate neural network for each of the different input dimensions, such as... Figure 1 As shown, the system automatically selects the appropriate neural network to make predictions based on the input dimension. As the input dimension increases (the real-time data collected increases from partial to complete), the predicted value of the neural network gradually changes from "coarse" to "accurate".

[0004] However, the number of neural networks in the above scheme increases with the possible increase of dimensionality, resulting in high complexity in neural network (model) training and large model storage overhead, which is not conducive to practical deployment and continuous evolution of neural network online learning. Summary of the Invention

[0005] This application provides a neural network operation method, apparatus, and storage medium to solve the technical problem in the prior art where the number of neural networks increases with the possible increase of dimensions.

[0006] In a first aspect, embodiments of this application provide a neural network operation method, including:

[0007] A second neural network is obtained by adding a random mask layer to the first neural network according to the type of variable dimension; the random mask layer is used to perform random masking processing on the tensors input to the random mask layer;

[0008] The second neural network is trained using sample data.

[0009] In some embodiments, the variable dimension type includes one or more of the following types:

[0010] Input dimensions are variable;

[0011] Output dimensions are variable;

[0012] The intermediate dimension is variable.

[0013] In some embodiments, adding a random mask layer to the first neural network according to the type of variable dimension includes:

[0014] When the variable dimension is of type variable input dimension, a random mask layer is added before the input layer of the first neural network.

[0015] In some embodiments, adding a random mask layer to the first neural network according to the type of variable dimension includes:

[0016] When the variable dimension is of type variable output dimension, a random mask layer is added after the output layer of the first neural network.

[0017] In some embodiments, adding a random mask layer to the first neural network according to the type of variable dimension includes:

[0018] When the variable dimension is of the type of intermediate variable dimension, a random mask layer is added to the intermediate layer of the first neural network.

[0019] In some embodiments, adding a random mask layer to the intermediate layer of the first neural network includes:

[0020] When only one intermediate dimension is variable, add a random mask layer before or after the associated intermediate layer.

[0021] In some embodiments, adding a random mask layer to the intermediate layer of the neural network includes:

[0022] In cases where multiple intermediate dimensions are variable, a random mask layer is added before or after each associated intermediate layer.

[0023] In some embodiments, training the second neural network using sample data includes:

[0024] When the dimension of the input data for each sample is the first threshold, the second neural network is trained directly using all the sample data; the first threshold is the maximum value of the dimension of the input data for all sample data.

[0025] In some embodiments, training the second neural network using sample data includes:

[0026] In the case where there is at least one first sample data, the first sample data is first augmented, and then the second neural network is trained using all the first sample data and all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0027] In some embodiments, the enhancement processing of the first sample data includes:

[0028] The input data of the first sample data is padded with zeros at the high bits.

[0029] In some embodiments, the enhancement processing of the first sample data includes:

[0030] The input data of the first sample data is padded with zeros at the least significant bit.

[0031] In some embodiments, training the second neural network using sample data includes:

[0032] In the case where at least one first sample data exists, the first sample data is first removed, and then the second neural network is trained using all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0033] In some embodiments, performing random masking on the tensors input to the random mask layer includes:

[0034] Determine the tensor input to the random mask layer and the random mask tensor;

[0035] The tensor input to the random mask layer is randomized using the random mask tensor.

[0036] In some embodiments, the expression for performing random masking on the tensor input to the random masking layer is as follows:

[0037]

[0038] in, Let X represent the tensor output by the random mask layer, and let X represent the tensor input to the random mask layer. This represents the pointwise multiplication operation of a tensor, where M represents the random mask tensor.

[0039] In some embodiments, the random mask tensor is a hard mask tensor.

[0040] In some embodiments, the random mask tensor is a soft-value mask tensor.

[0041] In some embodiments, the random mask tensor is a combination of hard mask tensors and soft mask tensors.

[0042] In some embodiments, after training the second neural network using sample data, the method further includes:

[0043] The random mask layer in the trained second neural network is replaced with a tensor transformation layer; the tensor transformation layer is used to perform dimensional transformation on the tensors input to the tensor transformation layer.

[0044] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0045] In the case where a random mask layer exists before the input layer of the trained second neural network, the random mask layer before the input layer of the trained second neural network is replaced with a tensor filling layer; the tensor filling layer is used to increase the dimension of the tensor input to the tensor filling layer to a first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0046] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0047] In the case where a random mask layer exists after the output layer of the trained second neural network, the random mask layer after the output layer of the trained second neural network is replaced with a tensor clipping layer; the tensor clipping layer is used to reduce the dimension of the tensor input to the tensor clipping layer to a first target value.

[0048] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0049] In the case where a random mask layer exists in the intermediate layer of the trained second neural network, the random mask layer of the intermediate layer of the trained second neural network is replaced with a tensor clipping cascade tensor filling layer; the tensor clipping cascade tensor filling layer is used to reduce the dimension of the tensor input to the tensor clipping cascade tensor filling layer to the second target value, and then increase it to the original dimension.

[0050] Secondly, embodiments of this application provide an electronic device, including a memory, a transceiver, and a processor;

[0051] A memory for storing computer programs; a transceiver for sending and receiving data under the control of the processor; and a processor for reading the computer programs from the memory and performing the following operations:

[0052] In some embodiments, the variable dimension type includes one or more of the following types:

[0053] Input dimensions are variable;

[0054] Output dimensions are variable;

[0055] The intermediate dimension is variable.

[0056] In some embodiments, adding a random mask layer to the first neural network according to the type of variable dimension includes:

[0057] When the variable dimension is of type variable input dimension, a random mask layer is added before the input layer of the first neural network.

[0058] In some embodiments, adding a random mask layer to the first neural network according to the type of variable dimension includes:

[0059] When the variable dimension is of type variable output dimension, a random mask layer is added after the output layer of the first neural network.

[0060] In some embodiments, adding a random mask layer to the first neural network according to the type of variable dimension includes:

[0061] When the variable dimension is of the type of intermediate variable dimension, a random mask layer is added to the intermediate layer of the first neural network.

[0062] In some embodiments, adding a random mask layer to the intermediate layer of the first neural network includes:

[0063] When only one intermediate dimension is variable, add a random mask layer before or after the associated intermediate layer.

[0064] In some embodiments, adding a random mask layer to the intermediate layer of the neural network includes:

[0065] In cases where multiple intermediate dimensions are variable, a random mask layer is added before or after each associated intermediate layer.

[0066] In some embodiments, training the second neural network using sample data includes:

[0067] When the dimension of the input data for each sample is the first threshold, the second neural network is trained directly using all the sample data; the first threshold is the maximum value of the dimension of the input data for all sample data.

[0068] In some embodiments, training the second neural network using sample data includes:

[0069] In the case where there is at least one first sample data, the first sample data is first augmented, and then the second neural network is trained using all the first sample data and all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0070] In some embodiments, the enhancement processing of the first sample data includes:

[0071] The input data of the first sample data is padded with zeros at the high bits.

[0072] In some embodiments, the enhancement processing of the first sample data includes:

[0073] The input data of the first sample data is padded with zeros at the least significant bit.

[0074] In some embodiments, training the second neural network using sample data includes:

[0075] In the case where at least one first sample data exists, the first sample data is first removed, and then the second neural network is trained using all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0076] In some embodiments, performing random masking on the tensors input to the random mask layer includes:

[0077] Determine the tensor input to the random mask layer and the random mask tensor;

[0078] The tensor input to the random mask layer is randomized using the random mask tensor.

[0079] In some embodiments, the expression for performing random masking on the tensor input to the random masking layer is as follows:

[0080]

[0081] in, Let X represent the tensor output by the random mask layer, and let X represent the tensor input to the random mask layer. This represents the pointwise multiplication operation of a tensor, where M represents the random mask tensor.

[0082] In some embodiments, the random mask tensor is a hard mask tensor.

[0083] In some embodiments, the random mask tensor is a soft-value mask tensor.

[0084] In some embodiments, the random mask tensor is a combination of hard mask tensors and soft mask tensors.

[0085] In some embodiments, after training the second neural network using sample data, the method further includes:

[0086] The random mask layer in the trained second neural network is replaced with a tensor transformation layer; the tensor transformation layer is used to perform dimensional transformation on the tensors input to the tensor transformation layer.

[0087] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0088] In the case where a random mask layer exists before the input layer of the trained second neural network, the random mask layer before the input layer of the trained second neural network is replaced with a tensor filling layer; the tensor filling layer is used to increase the dimension of the tensor input to the tensor filling layer to a first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0089] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0090] In the case where a random mask layer exists after the output layer of the trained second neural network, the random mask layer after the output layer of the trained second neural network is replaced with a tensor clipping layer; the tensor clipping layer is used to reduce the dimension of the tensor input to the tensor clipping layer to a first target value.

[0091] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0092] In the case where a random mask layer exists in the intermediate layer of the trained second neural network, the random mask layer of the intermediate layer of the trained second neural network is replaced with a tensor clipping cascade tensor filling layer; the tensor clipping cascade tensor filling layer is used to reduce the dimension of the tensor input to the tensor clipping cascade tensor filling layer to the second target value, and then increase it to the original dimension.

[0093] Thirdly, embodiments of this application provide a neural network operation apparatus, including:

[0094] An addition module is used to add a random mask layer to the first neural network according to the type of variable dimension to obtain a second neural network; the random mask layer is used to perform random masking processing on the tensors input to the random mask layer;

[0095] The training module is used to train the second neural network using sample data.

[0096] Fourthly, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing a processor to perform the steps of the neural network operation method described in the first aspect above.

[0097] Fifthly, embodiments of this application also provide a computer-readable storage medium storing a computer program for causing a computer to perform the steps of the neural network operation method described in the first aspect above.

[0098] In a sixth aspect, embodiments of this application also provide a communication device readable storage medium storing a computer program for causing the communication device to perform the steps of the neural network operation method described in the first aspect above.

[0099] In a seventh aspect, embodiments of this application also provide a chip product readable storage medium storing a computer program for causing the chip product to perform the steps of the neural network operation method described in the first aspect above.

[0100] The neural network operation method, apparatus, and storage medium provided in this application, by adding a random mask layer to the neural network, only need to train and deploy one neural network to adapt to different input and output dimension requirements. This method has low training complexity, low storage overhead, and is easy to deploy and continuously evolve through online training. Attached Figure Description

[0101] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0102] Figure 1 This is a schematic diagram of the training method for variable-dimensional neural networks in existing technology;

[0103] Figure 2 This is a flowchart illustrating the neural network operation method provided in an embodiment of this application;

[0104] Figure 3 This is a block diagram of a variable-dimensional neural network training method provided in an embodiment of this application;

[0105] Figure 4 This is a schematic diagram of the hard mask tensor provided in the embodiments of this application;

[0106] Figure 5 This is a block diagram of a variable-dimensional neural network deployment provided in an embodiment of this application;

[0107] Figure 6 This is a schematic diagram of the tensor filling and tensor clipping module provided in an embodiment of this application;

[0108] Figure 7 This is a schematic diagram of an autoencoder neural network provided in an embodiment of this application;

[0109] Figure 8 These are schematic diagrams of single-symbol and double-symbol DMRS provided in the embodiments of this application;

[0110] Figure 9 This is a block diagram of CSI compression feedback based on an autoencoder provided in an embodiment of this application;

[0111] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0112] Figure 11 This is a schematic diagram of the structure of a neural network operation device provided in an embodiment of this application. Detailed Implementation

[0113] Artificial neural networks (ANNs) are simplified models abstracted from the neural networks of the human brain from an information processing perspective. In academia and industry, ANNs are simply called neural networks. They are computational models composed of a large number of interconnected computing nodes in a specific way. These models are typically expressions or approximations of a certain algorithm or function mapping. During the training phase of a neural network, engineers first need to determine the network's structure and hyperparameters. Then, they feed data into the model and use gradient backpropagation to update the weights of the trained neural network. A well-trained neural network approximates the mapping relationship between input data and labels. During the deployment phase, feeding new data into the neural network yields predicted values. Common types of neural networks include fully connected feedforward neural networks, convolutional neural networks, and recurrent neural networks. With the improvement of computer performance and the widespread deployment of graphics processing units (GPUs), neural networks have become widely used in computer vision, natural language processing, biomedicine, and automatic control.

[0114] Neural network training and deployment are typically task-oriented, therefore the input and output dimensions of the neural network are generally fixed. A neural network trained for task A is usually unusable for task B, or performs poorly when used for task B. When the input and output dimensions of a neural network are uncertain, it is necessary to train a separate neural network for all possible input and output dimensions to cope with different dimensions and task requirements. For example, a system responds based on the predictions of a deployed neural network, whose input is real-time collected data. When the system has high real-time requirements, it is desirable for the neural network to provide some "rough" predictions based on partial data collection, so that the system can respond in a more favorable direction in advance, thereby saving the total time required to respond in the optimal direction. A feasible solution is to train a separate neural network for different input data dimensions (due to partial data collection leading to different input dimensions), such as... Figure 1 As shown, the system automatically selects the appropriate neural network to make predictions based on the input dimension. As the input dimension increases (the collected real-time data progresses from partial to complete), the neural network's predictions gradually shift from "coarse" to "accurate".

[0115] When the input and output dimensions of a neural network are uncertain, existing technologies require deploying multiple neural networks to cope with different input and output dimension requirements. The number of neural networks increases with the possible dimensionality, resulting in high model training complexity and large model storage overhead, which is not conducive to practical deployment and the continuous evolution of neural networks through online learning.

[0116] Based on the above-mentioned technical problems, this application proposes a neural network operation method, device and storage medium. The method adds a random mask layer to the neural network, and only one neural network needs to be trained and deployed to adapt to different input and output dimension requirements. It has low training complexity, low storage overhead and is easy to deploy and continuously evolve through online training.

[0117] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0118] Figure 2 This is a flowchart illustrating the neural network operation method provided in an embodiment of this application, as shown below. Figure 2 As shown, this application provides a neural network operation method, the execution subject of which can be an electronic device, such as a terminal, base station, core network element, etc. The method includes:

[0119] Step 201: Add a random mask layer to the first neural network according to the type of variable dimension to obtain the second neural network; the random mask layer is used to perform random masking processing on the tensors input to the random mask layer;

[0120] Step 202: Train the second neural network using sample data.

[0121] In some embodiments, the variable dimension type includes one or more of the following types:

[0122] Input dimensions are variable;

[0123] Output dimensions are variable;

[0124] The intermediate dimension is variable.

[0125] In some embodiments, a random mask layer is added to the first neural network according to the type of variable dimension, including:

[0126] When the variable dimension is of type variable input dimension, a random mask layer is added before the input layer of the first neural network.

[0127] In some embodiments, a random mask layer is added to the first neural network according to the type of variable dimension, including:

[0128] When the variable dimension is of type variable output dimension, a random mask layer is added after the output layer of the first neural network.

[0129] In some embodiments, a random mask layer is added to the first neural network according to the type of variable dimension, including:

[0130] When the variable dimension is of the type of intermediate variable dimension, a random mask layer is added to the intermediate layer of the first neural network.

[0131] In some embodiments, a random mask layer is added to the intermediate layer of the first neural network, including:

[0132] When only one intermediate dimension is variable, add a random mask layer before or after the associated intermediate layer.

[0133] In some embodiments, a random mask layer is added to the intermediate layer of the neural network, including:

[0134] In cases where multiple intermediate dimensions are variable, a random mask layer is added before or after each associated intermediate layer.

[0135] In some embodiments, training the second neural network using sample data includes:

[0136] With the dimension of the input data for each sample data being the first threshold, the second neural network is trained directly using all the sample data; the first threshold is the maximum value of the dimension of the input data for all sample data.

[0137] In some embodiments, training the second neural network using sample data includes:

[0138] In the case where there is at least one first sample data, the first sample data is first augmented, and then the second neural network is trained using all the first sample data and all the second sample data; the first sample data is the sample data whose input data dimension is not the first threshold; the second sample data is the sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0139] In some embodiments, the first sample data is augmented, including:

[0140] The input data for the first sample data is padded with zeros at the high bits.

[0141] In some embodiments, the first sample data is augmented, including:

[0142] The input data for the first sample data is padded with zeros at the least significant bit.

[0143] In some embodiments, training the second neural network using sample data includes:

[0144] If at least one first sample data exists, the first sample data is first removed, and then the second neural network is trained using all the second sample data; the first sample data is sample data whose input data dimension is not the first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the input data dimension of all sample data.

[0145] In some embodiments, random masking is performed on the tensors input to the random mask layer, including:

[0146] Determine the tensor input to the random mask layer and the random mask tensor;

[0147] The random mask tensor is used to perform random masking on the tensor input to the random mask layer.

[0148] In some embodiments, the expression for randomizing the tensors input to the random mask layer is as follows:

[0149]

[0150] in, Let X represent the tensor output by the random mask layer, and let X represent the tensor input to the random mask layer. This represents the pointwise multiplication operation of a tensor, where M represents the random mask tensor.

[0151] In some embodiments, the random mask tensor is a hard mask tensor.

[0152] In some embodiments, the random mask tensor is a soft-value mask tensor.

[0153] In some embodiments, the random mask tensor is composed of a combination of a hard mask tensor and a soft mask tensor.

[0154] In some embodiments, after training the second neural network using sample data, the method further includes:

[0155] The random mask layer in the trained second neural network is replaced with a tensor transformation layer; this tensor transformation layer is used to perform dimensional transformation on the tensors input to it.

[0156] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0157] In the case where a random mask layer exists before the input layer of the trained second neural network, the random mask layer before the input layer of the trained second neural network is replaced with a tensor padding layer; the tensor padding layer is used to increase the dimension of the tensor input to the tensor padding layer to a first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0158] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0159] In the case where a random mask layer exists after the output layer of the trained second neural network, the random mask layer after the output layer of the trained second neural network is replaced with a tensor clipping layer; the tensor clipping layer is used to reduce the dimension of the tensor input to the tensor clipping layer to a first target value.

[0160] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0161] In the case where a random mask layer exists in the intermediate layer of the trained second neural network, the random mask layer of the intermediate layer of the trained second neural network is replaced with a tensor clipping cascade tensor filling layer. This tensor clipping cascade tensor filling layer is used to reduce the dimension of the tensor input to the tensor clipping cascade tensor filling layer to the second target value, and then increase it to the original dimension.

[0162] In this embodiment, the input tensor dimensions and output tensor dimensions of the neural input layer, output layer, and some intermediate layers are determined based on the maximum dimension of the training data, the maximum dimension of the labels, and the task requirements.

[0163] Figure 3 This is a training block diagram of a variable-dimensional neural network provided in an embodiment of this application, such as... Figure 3 As shown, during the training phase, random mask modules (also called "random mask layers") are added to the layers corresponding to tensors requiring variable dimensions to train the network. Specifically, this can include the following steps:

[0164] 1. If the dimension of the neural network input is variable, add a random mask module to the left of the input layer;

[0165] 2. If the dimension of the neural network output is variable, add a random mask module to the right of the output layer;

[0166] 3. If the output dimension of the i-th intermediate layer and the input dimension of the (i+1)-th intermediate layer in the neural network are variable, then add a random mask module between intermediate layer i and intermediate layer i+1.

[0167] 4. If the input, output, and intermediate layers of a neural network have multiple variable dimensions, then add multiple random mask modules at the corresponding positions.

[0168] 5. On the left side of the input layer, the training data can use only the data of the maximum dimension (if there is data of a non-maximum dimension, these data can be removed first), or data augmentation can be performed before training, by padding the high-order or low-order bits with zeros to increase the low-dimensional input data to the maximum dimension.

[0169] After adding a random mask module, the neural network updates its training by calculating the gradient of the loss function with respect to the network weights. The random mask operation (random masking processing) acts on the tensor X, denoted as...

[0170]

[0171] in, X and M are both Dimensions (for example, if X is an image with a length of 64 and a width of 64, then L) X =64×64×3, where 3 represents the R of the three primary color channels (red, green, and blue). X order tensor, The input tensor has the i-th dimension, and the operation... This represents a pointwise multiplication of tensors, where M is a (random) mask tensor. This is the masking result. The mask tensor M is a random tensor, which is independent and identically distributed for each training sample and each training epoch. R X The mask tensor M of order M, with dimension M It can be, but is not limited to:

[0172] 1. Hard-Masking

[0173] This indicates the order of the mask required (for example, for a 6×6×3 dimensional image, a 6×6 dimension mask is applied, but no mask is applied to the 3 dimensions of the red, green, and blue primary color channels, then I = {1, 2}, such as...). Figure 4 As shown, the dimension of a 3rd-order tensor is 6×6×3. and (t=3 and t=4). Tensor Index is The element values ​​are as follows:

[0174]

[0175] Where, integer Following a given probability distribution (e.g., a uniform distribution), for each I... it are independent and identically distributed.

[0176] 2. Soft-Masking

[0177] For example, a soft mask with exponential decay. tensor Index is The element values ​​are as follows:

[0178]

[0179] Where, real number λ∈[0, λ max [I] follows a certain distribution (e.g., uniform distribution), for each I i λ is also independently and identically distributed.

[0180] 3. In M, a combination of hard and soft masks can be used, which is a combination of hard and soft masks.

[0181] When the aforementioned mask tensor is applied to a certain tensor, it does not change the tensor's own dimensions; this is equivalent to performing a weighted operation on the tensor. Tensor values ​​at smaller indices are assigned greater weight.

[0182] For example, for a first-order tensor (vector), a hard mask It is a first t position is 1 and then A vector with 0 bits. Equivalent to the latter of X Setting the bit value to zero does not change the tensor dimension.

[0183] During training, the optimizer calculates gradients based on the loss and backpropagates them to update the neural network weight parameters.

[0184] In addition, Figure 3 It can also contain the following:

[0185] 1. Neural networks can be, but are not limited to, convolutional neural networks, feedforward fully connected neural networks, recurrent neural networks, and combinations thereof;

[0186] 2. The loss function can be, but is not limited to, mean squared error, L1 norm, classification cross-entropy, and cosine similarity;

[0187] 3. The random mask module avoids gradient vanishing or non-differentiability issues by using custom gradients and treating mask tensors as constant tensors.

[0188] 4. Input-side random mask, output-side random mask, and intermediate layer random mask can coexist, or only a few of them can exist. The specific number used can be determined based on the specific task.

[0189] Figure 5 This is a block diagram of a variable-dimensional neural network deployment provided in an embodiment of this application, such as... Figure 5 As shown, during the deployment phase, the variable-dimensional neural network is constructed by removing random mask modules from the trained neural network and adding tensor padding modules (also known as "tensor padding layers") and tensor pruning modules (also known as "tensor pruning layers"). Specifically, this may include the following steps:

[0190] 1. The random mask module on the left side of the input layer is replaced with a tensor filling module, which fills the input tensor to the maximum input dimension by padding with zeros in the low or high bits.

[0191] 2. Replace the random mask module on the right side of the output layer with a tensor clipping module, and output the tensor by high-bit or low-bit clipping method;

[0192] 3. The random mask module between intermediate layer i and intermediate layer i+1 is replaced with a tensor clipping module cascaded with a tensor filling module.

[0193] Throughout the process, only one neural network needs to be trained and deployed to adapt to different input and output dimension requirements, avoiding the problems of training and storing multiple neural networks.

[0194] A variable-dimensional neural network is constructed based on the pre-trained neural network described above, by removing the random mask module and replacing it with tensor padding and tensor pruning modules, as follows: Figure 5 As shown. The replaced tensor filling and tensor clipping modules are as follows. Figure 6 As shown, when the length of the i-th order of the input tensor X is less than... Then, the tensor is padded with zeros in either the high or low bits to make the dimension of the i-th order equal to 1.

[0195] 1. If high-level zero padding is adopted, the training process is as follows: Figure 3 Same;

[0196] 2. If zero padding is used, the i-th index of the random mask tensor M corresponding to tensor X will require an additional reverse rearrangement operation.

[0197] When the i-th dimension of the output tensor X is greater than the required dimension, the output tensor X is pruned by removing either the low-order or high-order bits to obtain a tensor that meets the output dimension requirement.

[0198] 1. If low-position interception is adopted, the training process is the same as... Figure 3 Same;

[0199] 2. If high-order truncation is adopted, then during the training phase, the i-th order index of the random mask tensor M corresponding to tensor X needs to be additionally reversed.

[0200] As can be seen, the system only requires a single neural network deployment, and the output tensor can be pruned as needed, while the input tensor can be padded with zeros to meet the requirements of different input and output dimensions.

[0201] The above method will be further illustrated below with several specific embodiments.

[0202] Example 1:

[0203] like Figure 7 As shown, the neural network is an autoencoder used for image compression, where the encoder module compresses the image and the decoder module reconstructs it. Both the encoder input and decoder output are... The image is 3D, and the encoder output (which is also the decoder input) has a variable dimension requirement, with a maximum dimension of L. Z =8192. During the training phase, a random hard mask module is added between the encoder and decoder. The parameters t∈[0, 8192] of the mask tensor follow a uniform distribution, and the Adam optimizer is used to train the autoencoder neural network. After the neural network is trained, the encoder is deployed at the transmitting end, and the decoder is deployed at the receiving end. The transmitting end truncates the encoder output tensor according to the compression ratio requirements; the receiving end determines the number of tensor padding bits according to the received tensor length and pads the tensor, and then sends it to the decoder to recover the image.

[0204] Example 2:

[0205] Similar to Example 1, the autoencoder is used for image compression, with both encoder input and decoder output being... The image is 3D, and the encoder output (which is also the decoder input) has variable dimensions, with a maximum dimension of L. Z =128×128×3×(1-η) min The smaller the Z-dimensionality of the encoded feature, the higher the compression ratio. The higher the compression ratio η, the blurrier the recovered image; the larger the dimension of the encoded features, the lower the compression ratio η, and the clearer the recovered image. Possible values ​​for the compression ratio are... During the training phase, the parameters t∈{8192, 4096, 2048, 1024} of the hard mask module follow an equal probability distribution. It is applied to the encoder output.

[0206] Example 3:

[0207] In AI-based channel estimation algorithms, the receiver estimates the channel coefficients across all time-frequency resource blocks based on the received values ​​of the demodulation reference signal (DMRS). The channel recovery algorithm is implemented using a neural network. Under a single time slot (14 OFDM symbols) and 8 physical resource blocks (96 frequency points), the single-symbol DMRS and dual-symbol DMRS configurations are as follows: Figure 8 As shown. A single-symbol DMRS configuration corresponds to a neural network input dimension of 48×1×2 (48 corresponds to frequency, 1 to time, and 2 to the real and imaginary parts of the complex number). A double-symbol DMRS configuration (adding one more DMRS symbol to the single-symbol configuration) corresponds to a neural network input dimension of 48×2×2, and the neural network output dimension is 96×14×2. The maximum input dimension of the neural network used for channel estimation is L. X =48×2×2. During the training phase, a soft-value mask is applied to the second-order index dimension (time dimension) of the input tensor, with parameters λ∈[0,20] uniformly distributed. The deployed neural network with variable input dimensions is used for channel estimation in both single-symbol and double-symbol DMRS configurations.

[0208] Example 4:

[0209] Similar to Example 3, under a single time slot (14 OFDM symbols) and 8 physical resource blocks (96 frequency points), the single-symbol DMRS configuration corresponds to a neural network input dimension of 48×1×2, and the double-symbol DMRS configuration corresponds to a neural network input dimension of 48×2×2. The maximum input dimension of the neural network used for channel estimation is L. X = 48 × 2 × 2. During the training phase, a hard mask is applied to the second-order index dimension (time dimension) of the input tensor, with parameters t = 1, 2, and the probability distribution is...

[0210] Example 5:

[0211] like Figure 9 As shown, the AI-based Channel State Information (CSI) compression algorithm employs an autoencoder, with the encoder deployed on the UE side and the decoder deployed on the base station side. On the UE side, the channel H is estimated based on the CSI reference signal (RS), and a precoding vector V is calculated. The precoding vector V has a dimension of n. band ×n T ×2=12×32×2=768, where n band =12 indicates 12 sub-bands, n T =32 indicates 32 transmitting antennas, and 2 indicates the real and imaginary parts. The encoder compresses the 768-dimensional input value V into a vector. The tensor pruning module prunes the encoder output according to the required number of bits k and sends it to the base station. The base station performs tensor padding on the received bit stream based on the feedback number of bits and inputs it into the decoder to recover the precoded vector. During the training phase, a tensor mask module is added between the autoencoder and the decoder. A random hard mask is used, and the parameters t∈[1,384] of the mask tensor follow a uniform distribution. The loss function is cosine similarity.

[0212] The neural network operation method proposed in this application only requires training and deploying one neural network to adapt to different input and output dimension requirements. This method has low training complexity, low storage overhead, and is easy to deploy and continuously evolve through online training.

[0213] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 10 As shown, the electronic device includes a memory 1020, a transceiver 1000, and a processor 1010, wherein:

[0214] The memory 1020 is used to store computer programs; the transceiver 1000 is used to send and receive data under the control of the processor 1010; the processor 1010 is used to read the computer program in the memory 1020 and perform the following operations:

[0215] A second neural network is obtained by adding a random mask layer to the first neural network according to the type of variable dimension; the random mask layer is used to perform random masking processing on the tensors input to the random mask layer;

[0216] The second neural network is trained using sample data.

[0217] Specifically, the transceiver 1000 is used to receive and send data under the control of the processor 1010.

[0218] Among them, Figure 10 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 1010) and memory (memory 1020). The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 1000 can be multiple elements, including transmitters and receivers, providing units for communicating with various other devices over transmission media, including wireless channels, wired channels, optical fibers, etc. The processor 1010 is responsible for managing the bus architecture and general processing, and the memory 1020 can store data used by the processor 1010 during operation.

[0219] The processor 1010 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor can also adopt a multi-core architecture.

[0220] In some embodiments, the variable dimension type includes one or more of the following types:

[0221] Input dimensions are variable;

[0222] Output dimensions are variable;

[0223] The intermediate dimension is variable.

[0224] In some embodiments, adding a random mask layer to the first neural network according to the type of variable dimension includes:

[0225] When the variable dimension is of type variable input dimension, a random mask layer is added before the input layer of the first neural network.

[0226] In some embodiments, adding a random mask layer to the first neural network according to the type of variable dimension includes:

[0227] When the variable dimension is of type variable output dimension, a random mask layer is added after the output layer of the first neural network.

[0228] In some embodiments, adding a random mask layer to the first neural network according to the type of variable dimension includes:

[0229] When the variable dimension is of the type of intermediate variable dimension, a random mask layer is added to the intermediate layer of the first neural network.

[0230] In some embodiments, adding a random mask layer to the intermediate layer of the first neural network includes:

[0231] When only one intermediate dimension is variable, add a random mask layer before or after the associated intermediate layer.

[0232] In some embodiments, adding a random mask layer to the intermediate layer of the neural network includes:

[0233] In cases where multiple intermediate dimensions are variable, a random mask layer is added before or after each associated intermediate layer.

[0234] In some embodiments, training the second neural network using sample data includes:

[0235] When the dimension of the input data for each sample is the first threshold, the second neural network is trained directly using all the sample data; the first threshold is the maximum value of the dimension of the input data for all sample data.

[0236] In some embodiments, training the second neural network using sample data includes:

[0237] In the case where there is at least one first sample data, the first sample data is first augmented, and then the second neural network is trained using all the first sample data and all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0238] In some embodiments, the enhancement processing of the first sample data includes:

[0239] The input data of the first sample data is padded with zeros at the high bits.

[0240] In some embodiments, the enhancement processing of the first sample data includes:

[0241] The input data of the first sample data is padded with zeros at the least significant bit.

[0242] In some embodiments, training the second neural network using sample data includes:

[0243] In the case where at least one first sample data exists, the first sample data is first removed, and then the second neural network is trained using all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0244] In some embodiments, performing random masking on the tensors input to the random mask layer includes:

[0245] Determine the tensor input to the random mask layer and the random mask tensor;

[0246] The tensor input to the random mask layer is randomized using the random mask tensor.

[0247] In some embodiments, the expression for performing random masking on the tensor input to the random masking layer is as follows:

[0248]

[0249] in, Let X represent the tensor output by the random mask layer, and let X represent the tensor input to the random mask layer. This represents the pointwise multiplication operation of a tensor, where M represents the random mask tensor.

[0250] In some embodiments, the random mask tensor is a hard mask tensor.

[0251] In some embodiments, the random mask tensor is a soft-value mask tensor.

[0252] In some embodiments, the random mask tensor is a combination of hard mask tensors and soft mask tensors.

[0253] In some embodiments, after training the second neural network using sample data, the method further includes:

[0254] The random mask layer in the trained second neural network is replaced with a tensor transformation layer; the tensor transformation layer is used to perform dimensional transformation on the tensors input to the tensor transformation layer.

[0255] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0256] In the case where a random mask layer exists before the input layer of the trained second neural network, the random mask layer before the input layer of the trained second neural network is replaced with a tensor filling layer; the tensor filling layer is used to increase the dimension of the tensor input to the tensor filling layer to a first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0257] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0258] In the case where a random mask layer exists after the output layer of the trained second neural network, the random mask layer after the output layer of the trained second neural network is replaced with a tensor clipping layer; the tensor clipping layer is used to reduce the dimension of the tensor input to the tensor clipping layer to a first target value.

[0259] In some embodiments, replacing the random mask layer in the trained second neural network with a tensor transform layer includes:

[0260] In the case where a random mask layer exists in the intermediate layer of the trained second neural network, the random mask layer of the intermediate layer of the trained second neural network is replaced with a tensor clipping cascade tensor filling layer; the tensor clipping cascade tensor filling layer is used to reduce the dimension of the tensor input to the tensor clipping cascade tensor filling layer to the second target value, and then increase it to the original dimension.

[0261] Specifically, the electronic device provided in this application embodiment can implement all the method steps implemented by the method embodiment with the execution subject being an electronic device, and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0262] Figure 11 This is a schematic diagram of the structure of a neural network manipulation device provided in an embodiment of this application, as shown below. Figure 11 As shown, this application embodiment provides a neural network operation device, including an addition module 1101 and a training module 1102, wherein:

[0263] The addition module 1101 is used to add a random mask layer to the first neural network according to the type of variable dimension to obtain a second neural network; the random mask layer is used to perform random masking processing on the tensors input to the random mask layer; the training module 1102 is used to train the second neural network using sample data.

[0264] In some embodiments, the variable dimension type includes one or more of the following types:

[0265] Input dimensions are variable;

[0266] Output dimensions are variable;

[0267] The intermediate dimension is variable.

[0268] In some embodiments, the adding module is specifically used for:

[0269] When the variable dimension is of type variable input dimension, a random mask layer is added before the input layer of the first neural network.

[0270] In some embodiments, the adding module is specifically used for:

[0271] When the variable dimension is of type variable output dimension, a random mask layer is added after the output layer of the first neural network.

[0272] In some embodiments, the adding module is specifically used for:

[0273] When the variable dimension is of the type of intermediate variable dimension, a random mask layer is added to the intermediate layer of the first neural network.

[0274] In some embodiments, the adding module is specifically used for:

[0275] When only one intermediate dimension is variable, add a random mask layer before or after the associated intermediate layer.

[0276] In some embodiments, the adding module is specifically used for:

[0277] In cases where multiple intermediate dimensions are variable, a random mask layer is added before or after each associated intermediate layer.

[0278] In some embodiments, the training module is specifically used for:

[0279] When the dimension of the input data for each sample is the first threshold, the second neural network is trained directly using all the sample data; the first threshold is the maximum value of the dimension of the input data for all sample data.

[0280] In some embodiments, the training module is specifically used for:

[0281] In the case where there is at least one first sample data, the first sample data is first augmented, and then the second neural network is trained using all the first sample data and all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0282] In some embodiments, the training module is specifically used for:

[0283] The input data of the first sample data is padded with zeros at the high bits.

[0284] In some embodiments, the training module is specifically used for:

[0285] The input data of the first sample data is padded with zeros at the least significant bit.

[0286] In some embodiments, the training module is specifically used for:

[0287] In the case where at least one first sample data exists, the first sample data is first removed, and then the second neural network is trained using all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0288] In some embodiments, the training module is specifically used for:

[0289] Determine the tensor input to the random mask layer and the random mask tensor;

[0290] The tensor input to the random mask layer is randomized using the random mask tensor.

[0291] In some embodiments, the expression for performing random masking on the tensor input to the random masking layer is as follows:

[0292]

[0293] in, Let X represent the tensor output by the random mask layer, and let X represent the tensor input to the random mask layer. This represents the pointwise multiplication operation of a tensor, where M represents the random mask tensor.

[0294] In some embodiments, the random mask tensor is a hard mask tensor.

[0295] In some embodiments, the random mask tensor is a soft-value mask tensor.

[0296] In some embodiments, the random mask tensor is a combination of hard mask tensors and soft mask tensors.

[0297] In some embodiments, a deployment module is also included;

[0298] The deployment module is used to replace the random mask layer in the trained second neural network with a tensor transformation layer; the tensor transformation layer is used to perform dimensional transformation on the tensors input to the tensor transformation layer.

[0299] In some embodiments, the deployment module is specifically used for:

[0300] In the case where a random mask layer exists before the input layer of the trained second neural network, the random mask layer before the input layer of the trained second neural network is replaced with a tensor filling layer; the tensor filling layer is used to increase the dimension of the tensor input to the tensor filling layer to a first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

[0301] In some embodiments, the deployment module is specifically used for:

[0302] In the case where a random mask layer exists after the output layer of the trained second neural network, the random mask layer after the output layer of the trained second neural network is replaced with a tensor clipping layer; the tensor clipping layer is used to reduce the dimension of the tensor input to the tensor clipping layer to a first target value.

[0303] In some embodiments, the deployment module is specifically used for:

[0304] In the case where a random mask layer exists in the intermediate layer of the trained second neural network, the random mask layer of the intermediate layer of the trained second neural network is replaced with a tensor clipping cascade tensor filling layer; the tensor clipping cascade tensor filling layer is used to reduce the dimension of the tensor input to the tensor clipping cascade tensor filling layer to the second target value, and then increase it to the original dimension.

[0305] Specifically, the neural network operation device provided in this application embodiment can implement all the method steps implemented by the method embodiment where the execution subject is an electronic device, and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0306] It should be noted that the division of units / modules in the above embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.

[0307] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0308] In some embodiments, a computer-readable storage medium is also provided, the computer-readable storage medium storing a computer program for causing a computer to perform the steps of the neural network operation methods provided in the above method embodiments.

[0309] Specifically, the computer-readable storage medium provided in the embodiments of this application can implement all the method steps implemented in the above method embodiments and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiments and the beneficial effects will not be described in detail.

[0310] It should be noted that the computer-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic storage (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical storage (e.g., CD, DVD, BD, HVD), and semiconductor storage (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0311] It should also be noted that the terms "first," "second," etc., used in the embodiments of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, and the number of objects is not limited. For example, the first object can be one or more.

[0312] In the embodiments of this application, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0313] In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.

[0314] The technical solutions provided in this application can be applied to various systems, especially 5G systems. For example, applicable systems include Global System for Mobile Communication (GSM), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA) General Packet Radio Service (GPRS), Long Term Evolution (LTE), LTE Frequency Division Duplex (FDD), LTE Time Division Duplex (TDD), Long Term Evolution Advanced (LTE-A), Universal Mobile Telecommunication System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX), and 5G New Radio (NR). All of these systems include terminal equipment and network equipment. The systems may also include a core network component, such as Evolved Packet System (EPS) and 5G system (5GS).

[0315] The terminal devices involved in the embodiments of this application can be devices that provide voice and / or data connectivity to users, handheld devices with wireless connectivity, or other processing devices connected to a wireless modem. The names of the terminal devices may differ in different systems; for example, in a 5G system, a terminal device can be called User Equipment (UE). Wireless terminal devices can communicate with one or more core networks (CNs) via a Radio Access Network (RAN). Wireless terminal devices can be mobile terminal devices, such as mobile phones (or "cellular" phones) and computers with mobile terminal devices, for example, portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile devices that exchange voice and / or data with the RAN. Examples include Personal Communication Service (PCS) phones, cordless phones, Session Initiated Protocol (SIP) phones, Wireless Local Loop (WLL) stations, and Personal Digital Assistants (PDAs). Wireless terminal equipment can also be referred to as a system, subscriber unit, subscriber station, mobile station, mobile station, remote station, access point, remote terminal, access terminal, user terminal, user agent, or user device, but is not limited to these terms in the embodiments of this application.

[0316] The network device involved in this application embodiment can be a base station, which may include multiple cells providing services to terminals. Depending on the specific application, a base station may also be called an access point, or a device in an access network that communicates with a wireless terminal device through one or more sectors on the air interface, or other names. The network device can be used to exchange received air frames with Internet Protocol (IP) packets, acting as a router between the wireless terminal device and the rest of the access network, where the rest of the access network may include an Internet Protocol (IP) communication network. The network device can also coordinate the attribute management of the air interface. For example, the network equipment involved in the embodiments of this application can be a base transceiver station (BTS) in a Global System for Mobile communications (GSM) or Code Division Multiple Access (CDMA), a NodeB in a Wide-band Code Division Multiple Access (WCDMA) system, an evolved Node B (eNB or e-NodeB) in a long term evolution (LTE) system, a 5G base station (gNB) in a next generation system, a Home evolved Node B (HeNB), a relay node, a femto, a pico, etc., and is not limited in the embodiments of this application. In some network structures, the network equipment may include centralized unit (CU) nodes and distributed unit (DU) nodes, and the centralized unit and distributed unit may be geographically separated.

[0317] Network devices and terminal devices can each use one or more antennas for multiple-input multiple-output (MIMO) transmission. MIMO transmission can be single-user MIMO (SU-MIMO) or multiple-user MIMO (MU-MIMO). Depending on the configuration and number of antenna combinations, MIMO transmission can be 2D-MIMO, 3D-MIMO, FD-MIMO, or massive-MIMO, and can also be diversity transmission, precoding transmission, or beamforming transmission, etc.

[0318] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0319] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0320] These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the processor-readable memory produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0321] These processors can execute instructions that can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0322] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for operating a neural network, characterized in that, include: Based on the type of variable dimension, a random mask layer is set in the first neural network to obtain the second neural network; The random mask layer is used to perform random masking processing on the tensors input to the random mask layer; the first neural network is used for image compression, channel estimation, or channel state information (CSI) compression. The second neural network is trained using sample data.

2. The neural network operation method according to claim 1, characterized in that, The variable dimension type includes one or more of the following types: Input dimensions are variable; Output dimensions are variable; The intermediate dimension is variable.

3. The neural network operation method according to claim 2, characterized in that, The step of setting a random mask layer in the first neural network according to the type of variable dimension includes: When the variable dimension is of type variable input dimension, a random mask layer is set before the input layer of the first neural network.

4. The neural network operation method according to claim 2, characterized in that, The step of setting a random mask layer in the first neural network according to the type of variable dimension includes: When the variable dimension is of type variable output dimension, a random mask layer is set after the output layer of the first neural network.

5. The neural network operation method according to claim 2, characterized in that, The step of setting a random mask layer in the first neural network according to the type of variable dimension includes: When the variable dimension is of the type of intermediate variable dimension, a random mask layer is set in the intermediate layer of the first neural network.

6. The neural network operation method according to claim 5, characterized in that, The step of setting a random mask layer in the intermediate layer of the first neural network includes: When only one intermediate dimension is variable, a random mask layer is set before or after the associated intermediate layer.

7. The neural network operation method according to claim 5, characterized in that, The step of setting a random mask layer in the intermediate layer of the neural network includes: In cases where multiple intermediate dimensions are variable, a random mask layer is set before or after each associated intermediate layer.

8. The neural network operation method according to claim 1, characterized in that, The step of training the second neural network using sample data includes: When the dimension of the input data for each sample is the first threshold, the second neural network is trained directly using all the sample data; the first threshold is the maximum value of the dimension of the input data for all sample data.

9. The neural network operation method according to claim 1, characterized in that, The step of training the second neural network using sample data includes: In the case where there is at least one first sample data, the first sample data is first augmented, and then the second neural network is trained using all the first sample data and all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

10. The neural network operation method according to claim 9, characterized in that, The enhancement processing of the first sample data includes: The input data of the first sample data is padded with zeros at the high bits.

11. The neural network operation method according to claim 9, characterized in that, The enhancement processing of the first sample data includes: The input data of the first sample data is padded with zeros at the least significant bit.

12. The neural network operation method according to claim 1, characterized in that, The step of training the second neural network using sample data includes: In the case where at least one first sample data exists, the first sample data is first removed, and then the second neural network is trained using all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

13. The neural network operation method according to claim 1, characterized in that, The random masking process for the tensors input to the random mask layer includes: Determine the tensor input to the random mask layer and the random mask tensor; The tensor input to the random mask layer is randomized using the random mask tensor.

14. The neural network operation method according to claim 13, characterized in that, The expression for performing random masking on the tensor input to the random mask layer is as follows: ; in, This represents the tensor output by the random mask layer. This represents the tensor input to the random mask layer. This represents the pointwise multiplication operation of a tensor. This represents the random mask tensor.

15. The neural network operation method according to claim 13, characterized in that, The random mask tensor is a hard value mask tensor.

16. The neural network operation method according to claim 13, characterized in that, The random mask tensor is a soft-value mask tensor.

17. The neural network operation method according to claim 13, characterized in that, The random mask tensor is composed of a combination of hard mask tensors and soft mask tensors.

18. The neural network operation method according to claim 1, characterized in that, After training the second neural network using sample data, the method further includes: The random mask layer in the trained second neural network is updated to a tensor transformation layer; the tensor transformation layer is used to perform dimensional transformation on the tensors input to the tensor transformation layer.

19. The neural network operation method according to claim 18, characterized in that, The step of updating the random mask layer in the trained second neural network to a tensor transform layer includes: If a random mask layer exists before the input layer of the trained second neural network, the random mask layer before the input layer of the trained second neural network is updated to a tensor filling layer; the tensor filling layer is used to increase the dimension of the tensor input to the tensor filling layer to a first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

20. The neural network operation method according to claim 18, characterized in that, The step of updating the random mask layer in the trained second neural network to a tensor transform layer includes: In the case where a random mask layer exists after the output layer of the trained second neural network, the random mask layer after the output layer of the trained second neural network is updated to a tensor clipping layer; the tensor clipping layer is used to reduce the dimension of the tensor input to the tensor clipping layer to a first target value.

21. The neural network operation method according to claim 18, characterized in that, The step of updating the random mask layer in the trained second neural network to a tensor transform layer includes: In the case where a random mask layer exists in the intermediate layer of the trained second neural network, the random mask layer of the intermediate layer of the trained second neural network is updated to a tensor clipping cascade tensor filling layer; the tensor clipping cascade tensor filling layer is used to reduce the dimension of the tensor input to the tensor clipping cascade tensor filling layer to the second target value, and then increase it to the original dimension.

22. An electronic device, characterized in that, Includes memory, transceiver, and processor; A memory for storing computer programs; a transceiver for sending and receiving data under the control of the processor; and a processor for reading the computer programs from the memory and performing the following operations: A second neural network is obtained by setting a random mask layer in the first neural network according to the type of variable dimension; the random mask layer is used to perform random masking processing on the tensors input to the random mask layer; the first neural network is used for image compression, channel estimation or channel state information (CSI) compression; The second neural network is trained using sample data.

23. The electronic device according to claim 22, characterized in that, The variable dimension type includes one or more of the following types: Input dimensions are variable; Output dimensions are variable; The intermediate dimension is variable.

24. The electronic device according to claim 23, characterized in that, The step of setting a random mask layer in the first neural network according to the type of variable dimension includes: When the variable dimension is of type variable input dimension, a random mask layer is set before the input layer of the first neural network.

25. The electronic device according to claim 23, characterized in that, The step of setting a random mask layer in the first neural network according to the type of variable dimension includes: When the variable dimension is of type variable output dimension, a random mask layer is set after the output layer of the first neural network.

26. The electronic device according to claim 23, characterized in that, The step of setting a random mask layer in the first neural network according to the type of variable dimension includes: When the variable dimension is of the type of intermediate variable dimension, a random mask layer is set in the intermediate layer of the first neural network.

27. The electronic device according to claim 26, characterized in that, The step of setting a random mask layer in the intermediate layer of the first neural network includes: When only one intermediate dimension is variable, a random mask layer is set before or after the associated intermediate layer.

28. The electronic device according to claim 26, characterized in that, The step of setting a random mask layer in the intermediate layer of the neural network includes: In cases where multiple intermediate dimensions are variable, a random mask layer is set before or after each associated intermediate layer.

29. The electronic device according to claim 22, characterized in that, The step of training the second neural network using sample data includes: When the dimension of the input data for each sample is the first threshold, the second neural network is trained directly using all the sample data; the first threshold is the maximum value of the dimension of the input data for all sample data.

30. The electronic device according to claim 22, characterized in that, The step of training the second neural network using sample data includes: In the case where there is at least one first sample data, the first sample data is first augmented, and then the second neural network is trained using all the first sample data and all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

31. The electronic device according to claim 30, characterized in that, The enhancement processing of the first sample data includes: The input data of the first sample data is padded with zeros at the high bits.

32. The electronic device according to claim 30, characterized in that, The enhancement processing of the first sample data includes: The input data of the first sample data is padded with zeros at the least significant bit.

33. The electronic device according to claim 22, characterized in that, The step of training the second neural network using sample data includes: In the case where at least one first sample data exists, the first sample data is first removed, and then the second neural network is trained using all the second sample data; the first sample data is sample data whose input data dimension is not a first threshold; the second sample data is sample data whose input data dimension is the first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

34. The electronic device according to claim 22, characterized in that, The random masking process for the tensors input to the random mask layer includes: Determine the tensor input to the random mask layer and the random mask tensor; The tensor input to the random mask layer is randomized using the random mask tensor.

35. The electronic device according to claim 34, characterized in that, The expression for performing random masking on the tensor input to the random mask layer is as follows: ; in, This represents the tensor output by the random mask layer. This represents the tensor input to the random mask layer. This represents the pointwise multiplication operation of a tensor. This represents the random mask tensor.

36. The electronic device according to claim 34, characterized in that, The random mask tensor is a hard value mask tensor.

37. The electronic device according to claim 34, characterized in that, The random mask tensor is a soft-value mask tensor.

38. The electronic device according to claim 34, characterized in that, The random mask tensor is composed of a combination of hard mask tensors and soft mask tensors.

39. The electronic device according to claim 22, characterized in that, After training the second neural network using sample data, the method further includes: The random mask layer in the trained second neural network is updated to a tensor transformation layer; the tensor transformation layer is used to perform dimensional transformation on the tensors input to the tensor transformation layer.

40. The electronic device according to claim 39, characterized in that, The step of updating the random mask layer in the trained second neural network to a tensor transform layer includes: If a random mask layer exists before the input layer of the trained second neural network, the random mask layer before the input layer of the trained second neural network is updated to a tensor filling layer; the tensor filling layer is used to increase the dimension of the tensor input to the tensor filling layer to a first threshold; the first threshold is the maximum value of the dimension of the input data of all sample data.

41. The electronic device according to claim 39, characterized in that, The step of updating the random mask layer in the trained second neural network to a tensor transform layer includes: In the case where a random mask layer exists after the output layer of the trained second neural network, the random mask layer after the output layer of the trained second neural network is updated to a tensor clipping layer; the tensor clipping layer is used to reduce the dimension of the tensor input to the tensor clipping layer to a first target value.

42. The electronic device according to claim 39, characterized in that, The step of updating the random mask layer in the trained second neural network to a tensor transform layer includes: In the case where a random mask layer exists in the intermediate layer of the trained second neural network, the random mask layer of the intermediate layer of the trained second neural network is updated to a tensor clipping cascade tensor filling layer; the tensor clipping cascade tensor filling layer is used to reduce the dimension of the tensor input to the tensor clipping cascade tensor filling layer to the second target value, and then increase it to the original dimension.

43. A method for operating a neural network, characterized in that, include: Obtain forecast data; The predicted data is input into the deployed target neural network to obtain the predicted result output by the target neural network; wherein, the target neural network includes at least one tensor transformation layer, which is used to perform dimensional transformation on the tensors input to the tensor transformation layer; The target neural network is the second neural network as described in any one of claims 1 to 21.

44. An electronic device, characterized in that, Includes memory, transceiver, and processor; A memory for storing computer programs; a transceiver for sending and receiving data under the control of the processor; and a processor for reading the computer programs from the memory and performing the following operations: Obtain forecast data; The predicted data is input into the deployed target neural network to obtain the predicted result output by the target neural network; wherein, the target neural network includes at least one tensor transformation layer, which is used to perform dimensional transformation on the tensors input to the tensor transformation layer; The target neural network is the second neural network as described in any one of claims 1 to 21.

45. A neural network manipulation device, characterized in that, include: Add a module to set a random mask layer in the first neural network according to the type of variable dimension to obtain a second neural network; The random mask layer is used to perform random masking processing on the tensors input to the random mask layer; the first neural network is used for image compression, channel estimation, or channel state information (CSI) compression. The training module is used to train the second neural network using sample data.

46. ​​A neural network operation device, characterized in that, include: The acquisition module is used to acquire prediction data; A processing module is used to input the prediction data into a deployed target neural network to obtain the prediction result output by the target neural network; wherein, the target neural network includes at least one tensor transformation layer, which is used to perform dimensional transformation on the tensors input to the tensor transformation layer; The target neural network is the second neural network as described in any one of claims 1 to 21.

47. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that causes a computer to perform the neural network operation method according to any one of claims 1 to 21, or the neural network operation method according to claim 43.