Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-cmat committed Jul 19, 2024
1 parent 7537ffc commit 9d135e3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Original image used on the openshift platform:
# VS code: ghcr.io/maastrichtu-ids/code-server@sha256:56a27bb3171050a490a01e56b735c05fbfd96c3b6d0194e3837e0a3f99e99534
# Jupyter Notebook: ghcr.io/maastrichtu-ids/jupyterlab@sha256:08caa3920ba16eee04f2acf16b2f066f7a3e336cdc8f9cee3901a9e4ed256612
FROM python:3.8.8

# Install the dependencies
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,32 @@ torch.manual_seed()
Finally, the scripts provided in the folder `/data/models` already include all the necessary configurations
to reproduce our results for the prediction of each outcome.

We've trained the network in [DSRI](dsri.maastrichtuniversity.nl), an openshift cluster of servers. Although
we provide the seeds and scripts to reproduce the results, inconsistencies may occur in certain machines.
We observed that some systems differ when executing the `torch.nn.Dropout` function (using the same seeds):
```python
import random
import torch
random.seed(7651962)
random_seed_split = random.randint(0, 9174937)
torch.manual_seed(775135)
# Gives the same result:
data = np.random.rand(4, 4)
# Gives different results:
dp1 = nn.Dropout(p=0.3)
dp1(data)
```

Setting up the following confirations did not change the behavior. The `Dropout` function still provided different
results.
```python
device = torch.device("cpu")
torch.backends.cudnn.deterministic = True
torch.set_num_threads(1)
```

Using our own implementation of `Dropout` seems to resolve the problem.

## Results

Performance results using only imaging data:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.8"

services:
hn-cnn:
image: pmateus/hn-cnn:1.3.0
image: pmateus/hn-cnn:1.4.0
environment:
TRAIN_CLINICAL_DATA_PATH: /mnt/data
volumes:
Expand Down

0 comments on commit 9d135e3

Please sign in to comment.