Skip to content

Commit

Permalink
remove python 2 compatibility code
Browse files Browse the repository at this point in the history
  • Loading branch information
pattonw committed Apr 20, 2024
1 parent 8713321 commit dc48b41
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
20 changes: 0 additions & 20 deletions gunpowder/compat.py

This file was deleted.

3 changes: 1 addition & 2 deletions gunpowder/tensorflow/nodes/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ def __init__(
self.summary_saver = None
self.log_dir = log_dir
self.log_every = log_every
# Check if optimizer is a str in python 2/3 compatible way.
if isinstance(optimizer, ("".__class__, "".__class__)):
if isinstance(optimizer, str):
self.optimizer_loss_names = (optimizer, loss)
else:
self.optimizer_func = optimizer
Expand Down

0 comments on commit dc48b41

Please sign in to comment.