rename stuff and add a couple missing imports
This commit is contained in:
parent
bbdb91fcb1
commit
c81ce0afbb
18 changed files with 20 additions and 18 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from onn import *
|
||||
from onn.floats import *
|
||||
from onn.float import *
|
||||
from dotmap import DotMap
|
||||
|
||||
lower_priority()
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
# this is gonna take some work.
|
||||
|
||||
from .activation import *
|
||||
from .floats import *
|
||||
from .float import *
|
||||
from .initialization import *
|
||||
from .layer import *
|
||||
from .learner import *
|
||||
from .loss import *
|
||||
from .math import *
|
||||
from .model import *
|
||||
from .nodes import *
|
||||
from .nodal import *
|
||||
from .optimizer import *
|
||||
from .parametric import *
|
||||
from .regularizer import *
|
||||
from .ritual import *
|
||||
from .util import *
|
||||
from .weights import *
|
||||
from .utility import *
|
||||
from .weight import *
|
||||
|
||||
# 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
|
||||
|
|
|
@ -3,7 +3,7 @@ import numpy as np
|
|||
# just for speed, not strictly essential:
|
||||
from scipy.special import expit as sigmoid
|
||||
|
||||
from .floats import *
|
||||
from .float import *
|
||||
from .layer_base import *
|
||||
|
||||
class Identity(Layer):
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from .layer_base import *
|
||||
from .initialization import *
|
||||
from .floats import *
|
||||
from .float import *
|
||||
|
||||
# Nonparametric Layers {{{1
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import numpy as np
|
|||
|
||||
from collections import defaultdict, OrderedDict
|
||||
|
||||
from .weights import *
|
||||
from .weight import *
|
||||
|
||||
# used for numbering layers like Keras:
|
||||
_layer_counters = defaultdict(lambda: 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from .floats import *
|
||||
from .float import *
|
||||
from .optimizer_base import *
|
||||
|
||||
class Learner:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import numpy as np
|
||||
|
||||
from .floats import *
|
||||
from .float import *
|
||||
|
||||
class Loss:
|
||||
def forward(self, p, y):
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import sys
|
||||
|
||||
from .floats import *
|
||||
from .nodes import *
|
||||
from .float import *
|
||||
from .nodal import *
|
||||
from .layer_base import *
|
||||
from .utility import *
|
||||
|
||||
class Model:
|
||||
def __init__(self, nodes_in, nodes_out, loss=None, mloss=None, unsafe=False):
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import numpy as np
|
||||
|
||||
from .floats import *
|
||||
from .float import *
|
||||
from .optimizer_base import *
|
||||
from .utility import *
|
||||
|
||||
# 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import numpy as np
|
||||
|
||||
from .floats import *
|
||||
from .float import *
|
||||
|
||||
class Optimizer:
|
||||
def __init__(self, lr=0.1):
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import numpy as np
|
||||
|
||||
from .floats import *
|
||||
from .float import *
|
||||
from .layer_base import *
|
||||
from .initialization import *
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import numpy as np
|
||||
|
||||
from .floats import *
|
||||
from .float import *
|
||||
|
||||
class Regularizer:
|
||||
pass
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import numpy as np
|
||||
|
||||
from .floats import *
|
||||
from .float import *
|
||||
from .initialization import *
|
||||
from .ritual_base import *
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import types
|
||||
import numpy as np
|
||||
|
||||
from .floats import *
|
||||
from .float import *
|
||||
|
||||
class Ritual: # i'm just making up names at this point.
|
||||
def __init__(self, learner=None):
|
||||
|
|
Loading…
Reference in a new issue