Skip to content

Commit 48280da

Browse files
committed
added google colab link
1 parent 6369053 commit 48280da

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Neural-Backed Decision Trees
22

3-
[Project Page]()  //  [Paper]()  //  [No-code Web Demo]()  //  [Colab Notebook]()
3+
[Project Page]()  //  [Paper]()  //  [No-code Web Demo]()  //  [Colab Notebook](https://colab.research.google.com/github/alvinwan/neural-backed-decision-trees/blob/master/examples/load_pretrained_nbdts.ipynb)
44

55
Run decision trees that achieve state-of-the-art accuracy for explainable models on CIFAR10, CIFAR100, TinyImagenet200, and ImageNet. NBDTs achieve accuracies within 1% of the original neural network on CIFAR10, CIFAR100, and TinyImagenet200 with the recently state-of-the-art WideResNet; and within 2% of the original neural network on Imagenet, using recently state-of-the-art EfficientNet.
66

@@ -57,7 +57,7 @@ Prediction: bear // Decisions: vertebrate, placental, ungulate, horse
5757

5858
## Loading Pretrained NBDTs in Code
5959

60-
<i>Don't want to download? Try inference on a pre-filled [Google Colab Notebook]().</i>
60+
<i>Don't want to download? Try inference on a pre-filled [Google Colab Notebook](https://colab.research.google.com/github/alvinwan/neural-backed-decision-trees/blob/master/examples/load_pretrained_nbdts.ipynb).</i>
6161

6262
If you haven't already, pip install the `nbdt` utility.
6363

@@ -67,7 +67,7 @@ pip install nbdt
6767

6868
Then, pick an NBDT inference mode (hard or soft), dataset, and backbone. By default, we support ResNet18 and WideResNet28x10 for CIFAR10, CIFAR100, and TinyImagenet200. See [nbdt-pytorch-image-models](https://github.com/alvinwan/nbdt-pytorch-image-models) for EfficientNet-EdgeTPUSmall on ImageNet.
6969

70-
<sub>[Try below script on Google Colab]()</sub>
70+
<sub>[Try below script on Google Colab](https://colab.research.google.com/github/alvinwan/neural-backed-decision-trees/blob/master/examples/load_pretrained_nbdts.ipynb)</sub>
7171

7272
```python
7373
from nbdt.model import SoftNBDT
@@ -83,9 +83,7 @@ model = SoftNBDT(
8383

8484
Note `torchvision.models.resnet18` only supports 224x224 input. However, `nbdt.models.resnet.ResNet18` supports variable size inputs. See [Models](#models) for instructions on using your favorite image classification neural network.
8585

86-
Examples:
87-
88-
**Example in ~30 lines**: See [`nbdt/bin/nbdt`](https://github.com/alvinwan/neural-backed-decision-trees/blob/master/nbdt/bin/nbdt), which loads the pretrained model, loads an image, and runs inference on the image in ~30 lines. This file is the executable `nbdt` in the previous section.
86+
**Example in ~30 lines**: See [`nbdt/bin/nbdt`](https://github.com/alvinwan/neural-backed-decision-trees/blob/master/nbdt/bin/nbdt), which loads the pretrained model, loads an image, and runs inference on the image in ~30 lines. This file is the executable `nbdt` in the previous section. Try this in a [Google Colab Notebook](https://colab.research.google.com/github/alvinwan/neural-backed-decision-trees/blob/master/examples/load_pretrained_nbdts.ipynb).
8987

9088
# Convert Neural Networks to Decision Trees
9189

@@ -108,8 +106,6 @@ Examples:
108106
model = SoftNBDT(dataset='CIFAR10', model=model) # `model` is your original model
109107
```
110108

111-
Examples:
112-
113109
**Example integration with repository**: See [`nbdt-pytorch-image-models`](https://github.com/alvinwan/nbdt-pytorch-image-models), which applies this 3-step integration to a popular image classification repository `pytorch-image-models`.
114110

115111
**Example notebook with MNIST training**: Try the [Google Colab Notebook]() with example training for MNIST, applying this 3-step integration to a simple pipeline.

0 commit comments

Comments
 (0)