You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Getting the value of the loss function](#getting-the-value-of-the-loss-function)
11
+
12
+
<!-- /TOC -->
13
+
14
+
This class implements a layer that calculates a loss function equal to the l1 distance between the objects from the network response and the objects of the correct answer.
15
+
16
+
## Settings
17
+
18
+
The layer has no settings.
19
+
20
+
## Trainable parameters
21
+
22
+
The layer has no trainable parameters.
23
+
24
+
## Inputs
25
+
26
+
The layer may have 2 to 3 inputs:
27
+
28
+
1. The network output for which you are calculating the loss function. It contains `BatchLength * BatchWidth * ListSize` objects, each of `Height * Width * Depth * Channels` size.
29
+
2. A blob of the same size as the first input, containing the correct class objects. The loss function will calculate the L1 distance between the first and the second input.
30
+
3.*[Optional]* The objects' weights. This blob should have the same dimensions as the first input.
31
+
32
+
## Outputs
33
+
34
+
This layer has no output.
35
+
36
+
### Getting the value of the loss function
37
+
38
+
```c++
39
+
floatGetLastLoss() const;
40
+
```
41
+
42
+
Use this method to get the value of the loss function calculated on the network's last run.
-[Значение функции потерь](#значение-функции-потерь)
11
+
12
+
<!-- /TOC -->
13
+
14
+
Класс реализует слой, вычисляющий функцию потерь, равную L1 расстоянию между объектами из ответа сети и объектами из правильных ответов.
15
+
16
+
## Настройки
17
+
18
+
Слой не имеет настроек.
19
+
20
+
## Обучаемые параметры
21
+
22
+
Слой не имеет обучаемых параметров.
23
+
24
+
## Входы
25
+
26
+
Слой имеет 2 или 3 входа:
27
+
28
+
1. Ответы сети, на которых необходимо вычислить функцию потерь. Содержит `BatchLength * BatchWidth * ListSize` объектов размера `Height * Width * Depth * Channels`.
29
+
2. Правильные ответы в виде блоба того же размера, что и блоб у первого входа. Функция потерь равняется расстояниям между объектами из первого входа и второго.
30
+
3.*[Опционально]* Веса объектов. Блоб этого входа должен иметь те же `BatchLength`, `BatchWidth` и `ListSize`, что и у первого входа. `Height`, `Width`, `Depth` и `Channels` должны быть равны `1`.
31
+
32
+
## Выходы
33
+
34
+
Слой не имеет выходов.
35
+
36
+
### Значение функции потерь
37
+
38
+
```c++
39
+
floatGetLastLoss() const;
40
+
```
41
+
42
+
Получение значения функции потерь на последнем запуске сети.
0 commit comments