Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Commit

Permalink
Fix for Python 2.7 syntax, simplified native layer code.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjc committed Apr 2, 2016
1 parent 5df1253 commit 6f84794
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions sknn/nn.py
Expand Up @@ -29,13 +29,9 @@ class ansi:

class Native(object):

def __init__(self, constructor, *args, name=None, units=None, **keywords):
self.name = name
self.units = units

self.frozen = None
self.weight_decay = None
self.normalize = None
def __init__(self, constructor, *args, **keywords):
for attr in ['name', 'units', 'frozen', 'weight_decay', 'normalize']:
setattr(self, attr, keywords.pop(attr, None))

self.type = constructor
self.args = args
Expand Down

0 comments on commit 6f84794

Please sign in to comment.