Skip to content

Commit c9e82ab

Browse files
committed
readme
1 parent cb2e9fd commit c9e82ab

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ out.sum().backward()
5252

5353
```
5454

55+
You can supply your own gradient filtering method as a `Callable[[Tensor], Tensor]` with the `filter_gradients_fn` kwarg as so
56+
57+
```python
58+
59+
def filtering_fn(grads):
60+
# make your big discovery here
61+
return grads
62+
63+
gaf_net = GAFWrapper(
64+
net = net,
65+
filter_gradients_fn = filtering_fn
66+
)
67+
68+
```
69+
5570
## Todo
5671

5772
- [ ] replicate cifar results on single machine

0 commit comments

Comments
 (0)