Skip to content
This repository was archived by the owner on Aug 21, 2020. It is now read-only.

Commit

Permalink
Makes suggested corrections to JOSS paper. Corrects accidental copy/p…
Browse files Browse the repository at this point in the history
…aste mistake in gen dataset defs.
  • Loading branch information
zhampel committed Feb 20, 2019
1 parent 52808dd commit 7559557
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cyphercat/datadefs/cyphercat_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ def get_preload_split_fn(name=''):
fn = PRELOAD_SPLIT_FN_DICT[name]
return fn
else:
raise ValueError('Invalid test statistic, {}, entered. Must be '
raise ValueError('Invalid dataset, {}, entered. Must be '
'in {}'.format(name, PRELOAD_SPLIT_FN_DICT.keys()))
6 changes: 3 additions & 3 deletions docs/joss_paper/paper.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'Cyphercat: A Python Package for Reproduceably Evaluating Adversarial Robustness'
title: 'Cyphercat: A Python Package for Reproduceably Evaluating Robustness Against Privacy Attacks'
tags:
- Python
- machine learning
Expand Down Expand Up @@ -65,8 +65,8 @@ Cyphercat is an extensible Python package for benchmarking privacy
attack and defense efficacy in a reproducible environment.
The Cyphercat application programming interface (API) allows users to test the
robustness of a specified target model against several well-documented privacy
attacks [@mlleaks][@fredrikson2015model], which extract details of the training data from the model,
including the option to assess defenses.
attacks [@mlleaks][@fredrikson2015model], which aim to extract detailed of the training data from the model.
Also included is the option to further assess the efficacy of several implemented defense methods.
The API is built on the PyTorch [@pytorch] machine learning library and
provides access to well known image, audio, and text benchmark datasets used for machine learning applications.
The Cyphercat API includes the option to train on commonly used architectures,
Expand Down
6 changes: 4 additions & 2 deletions scripts/test_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def main():
ccatset = CCATDataset(path=data_struct.save_path, name=data_name, splits=splits, transforms=[train_transform])
trainset = ccatset.get_split_n(0)
testset = ccatset.get_split_n(1)
n_classes = 10
n_classes = data_struct.n_classes
img_size = data_struct.height
n_in = data_struct.channels

## Define pyTorch ingestors for training and testing
trainloader = torch.utils.data.DataLoader(trainset, batch_size=batch_size, shuffle=True, num_workers=2)
Expand All @@ -98,7 +100,7 @@ def main():
#imshow(torchvision.utils.make_grid(imgs))

# Prepare the model for training
model = get_predef_model(model_name)(n_in=3, n_classes=n_classes, n_filters=64, size=250)
model = get_predef_model(model_name)(n_in=n_in, n_classes=n_classes, n_filters=64, size=img_size)
model.to(device)
model.apply(weights_init)
model_optim = optim.Adam(model.parameters(), lr=learnrate/10)
Expand Down

0 comments on commit 7559557

Please sign in to comment.