Skip to content

Commit

Permalink
fixed deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
civodlu committed Jan 31, 2020
1 parent d129c6d commit c48d90d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/test_simple_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_denses(self):
i,
sizes=[16, 32],
dropout_probability=0.5,
with_batchnorm=True,
batch_norm_kwargs={},
activation=torch.nn.ReLU6,
last_layer_is_output=True)
net = trw.simple_layers.compile_nn([o])
Expand Down
2 changes: 1 addition & 1 deletion tutorials/classification_cirfar10_darts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self, options):

dropout_probability = options['training_parameters']['dropout_probability']
self.convs = trw.layers.convs_2d(3, [64, 128, 256], batch_norm_kwargs={}, convolution_repeats=[3, 3, 3])
self.denses = trw.layers.denses([4096, 256, 10], dropout_probability=None, with_batchnorm=True, last_layer_is_output=True)
self.denses = trw.layers.denses([4096, 256, 10], dropout_probability=None, batch_norm_kwargs={}, last_layer_is_output=True)

def forward(self, batch):
# a batch should be a dictionary of features
Expand Down
4 changes: 2 additions & 2 deletions tutorials/explanation_synthetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
def create_net_simple(options):
activation = nn.ReLU
n = trw.simple_layers.Input([None, 3, 64, 64], 'image')
n = trw.simple_layers.convs_2d(n, channels=[4, 8, 16], with_batchnorm=True, activation=activation)
n = trw.simple_layers.convs_2d(n, channels=[4, 8, 16], batch_norm_kwargs={}, activation=activation)
n = trw.simple_layers.global_max_pooling_2d(n)
n = trw.simple_layers.denses(n, sizes=[32, 2], with_batchnorm=True, activation=activation, last_layer_is_output=True)
n = trw.simple_layers.denses(n, sizes=[32, 2], batch_norm_kwargs={}, activation=activation, last_layer_is_output=True)
n = trw.simple_layers.OutputClassification(n, output_name='softmax', classes_name='triangle')
return trw.simple_layers.compile_nn([n])

Expand Down

0 comments on commit c48d90d

Please sign in to comment.