Accuracy.md 735 字节
Newer Older
S
sunyanfang01 已提交
1 2 3 4 5 6 7 8
## Accuracy


### [Accuracy](http://caffe.berkeleyvision.org/tutorial/layers/accuracy.html)
```
layer {
    name: "accuracy"
    type: "Accuracy"
S
SunAhong1993 已提交
9
    bottom: "input"
S
sunyanfang01 已提交
10 11
    bottom: "label"
    top: "accuracy"
S
SunAhong1993 已提交
12 13 14 15
    accuracy_param{
        top_k = 1
	axis = 1
	# ignore_label = 0 # 定义需要忽略的label的类标,一般未定义
S
sunyanfang01 已提交
16 17 18 19 20
    }
}
```


S
SunAhong1993 已提交
21
### [paddle.fluid.layers.accuracy](http://paddlepaddle.org/documentation/docs/zh/1.4/api_cn/layers_cn.html#accuracy)
S
sunyanfang01 已提交
22 23 24 25
```python
paddle.fluid.layers.accuracy(
    input,
    label,
S
SunAhong1993 已提交
26 27 28
    k=1,
    correct=None,
    total=None
S
sunyanfang01 已提交
29 30 31 32
)
```  

### 功能差异
J
Jason 已提交
33
#### 计算机制
S
SunAhong1993 已提交
34 35
Caffe:可以设置计算某一维的accuracy;          
PaddlePaddle:不可以设置计算某一维的accuracy。
S
sunyanfang01 已提交
36 37 38 39 40 41