rename stuff and add a couple missing imports

This commit is contained in:
Connor Olding 2018-01-21 22:16:36 +00:00
parent bbdb91fcb1
commit c81ce0afbb
18 changed files with 20 additions and 18 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from onn import * from onn import *
from onn.floats import * from onn.float import *
from dotmap import DotMap from dotmap import DotMap
lower_priority() lower_priority()

View file

@ -5,20 +5,20 @@
# this is gonna take some work. # this is gonna take some work.
from .activation import * from .activation import *
from .floats import * from .float import *
from .initialization import * from .initialization import *
from .layer import * from .layer import *
from .learner import * from .learner import *
from .loss import * from .loss import *
from .math import * from .math import *
from .model import * from .model import *
from .nodes import * from .nodal import *
from .optimizer import * from .optimizer import *
from .parametric import * from .parametric import *
from .regularizer import * from .regularizer import *
from .ritual import * from .ritual import *
from .util import * from .utility import *
from .weights import * from .weight import *
# this is similar to default behaviour of having no __all__ variable at all, # this is similar to default behaviour of having no __all__ variable at all,
# but ours ignores modules as well. this allows for `import sys` and such # but ours ignores modules as well. this allows for `import sys` and such

View file

@ -3,7 +3,7 @@ import numpy as np
# just for speed, not strictly essential: # just for speed, not strictly essential:
from scipy.special import expit as sigmoid from scipy.special import expit as sigmoid
from .floats import * from .float import *
from .layer_base import * from .layer_base import *
class Identity(Layer): class Identity(Layer):

View file

@ -1,6 +1,6 @@
from .layer_base import * from .layer_base import *
from .initialization import * from .initialization import *
from .floats import * from .float import *
# Nonparametric Layers {{{1 # Nonparametric Layers {{{1

View file

@ -2,7 +2,7 @@ import numpy as np
from collections import defaultdict, OrderedDict from collections import defaultdict, OrderedDict
from .weights import * from .weight import *
# used for numbering layers like Keras: # used for numbering layers like Keras:
_layer_counters = defaultdict(lambda: 0) _layer_counters = defaultdict(lambda: 0)

View file

@ -1,4 +1,4 @@
from .floats import * from .float import *
from .optimizer_base import * from .optimizer_base import *
class Learner: class Learner:

View file

@ -1,6 +1,6 @@
import numpy as np import numpy as np
from .floats import * from .float import *
class Loss: class Loss:
def forward(self, p, y): def forward(self, p, y):

View file

@ -1,8 +1,9 @@
import sys import sys
from .floats import * from .float import *
from .nodes import * from .nodal import *
from .layer_base import * from .layer_base import *
from .utility import *
class Model: class Model:
def __init__(self, nodes_in, nodes_out, loss=None, mloss=None, unsafe=False): def __init__(self, nodes_in, nodes_out, loss=None, mloss=None, unsafe=False):

View file

@ -1,7 +1,8 @@
import numpy as np import numpy as np
from .floats import * from .float import *
from .optimizer_base import * from .optimizer_base import *
from .utility import *
# some of the the following optimizers are blatantly lifted from tiny-dnn: # some of the the following optimizers are blatantly lifted from tiny-dnn:
# https://github.com/tiny-dnn/tiny-dnn/blob/master/tiny_dnn/optimizers/optimizer.h # https://github.com/tiny-dnn/tiny-dnn/blob/master/tiny_dnn/optimizers/optimizer.h

View file

@ -1,6 +1,6 @@
import numpy as np import numpy as np
from .floats import * from .float import *
class Optimizer: class Optimizer:
def __init__(self, lr=0.1): def __init__(self, lr=0.1):

View file

@ -1,6 +1,6 @@
import numpy as np import numpy as np
from .floats import * from .float import *
from .layer_base import * from .layer_base import *
from .initialization import * from .initialization import *

View file

@ -1,6 +1,6 @@
import numpy as np import numpy as np
from .floats import * from .float import *
class Regularizer: class Regularizer:
pass pass

View file

@ -1,6 +1,6 @@
import numpy as np import numpy as np
from .floats import * from .float import *
from .initialization import * from .initialization import *
from .ritual_base import * from .ritual_base import *

View file

@ -1,7 +1,7 @@
import types import types
import numpy as np import numpy as np
from .floats import * from .float import *
class Ritual: # i'm just making up names at this point. class Ritual: # i'm just making up names at this point.
def __init__(self, learner=None): def __init__(self, learner=None):