Browse Source

!341 Fix API Issue for SuppressCtrl

Merge pull request !341 from 张澍坤/master
tags/v1.8.0
i-robot Gitee 3 years ago
parent
commit
5d69eeec88
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py

+ 6
- 1
mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py View File

@@ -676,7 +676,12 @@ class SuppressCtrl(Cell):
return sparse, sparse_value_1, sparse_value_2

def calc_actual_sparse_for_fc1(self, networks):
"""calculate actual sparse for full connection 1 layer"""
"""
Calculate actual sparse for full connection 1 layer

Args:
networks (Cell): The training network.
"""
return self.calc_actual_sparse_for_layer(networks, "fc1.weight")

def calc_actual_sparse_for_layer(self, networks, layer_name):


Loading…
Cancel
Save