mirror of
https://github.com/gryf/coach.git
synced 2025-12-18 19:50:17 +01:00
Unify base class using new-style (object).
This commit is contained in:
@@ -19,7 +19,7 @@ import ngraph as ng
|
||||
from ngraph.util.names import name_scope
|
||||
|
||||
|
||||
class InputEmbedder:
|
||||
class InputEmbedder(object):
|
||||
def __init__(self, input_size, batch_size=None, activation_function=neon.Rectlin(), name="embedder"):
|
||||
self.name = name
|
||||
self.input_size = input_size
|
||||
|
||||
@@ -22,7 +22,7 @@ from utils import force_list
|
||||
from architectures.neon_components.losses import *
|
||||
|
||||
|
||||
class Head:
|
||||
class Head(object):
|
||||
def __init__(self, tuning_parameters, head_idx=0, loss_weight=1., is_local=True):
|
||||
self.head_idx = head_idx
|
||||
self.name = "head"
|
||||
|
||||
@@ -20,7 +20,7 @@ from ngraph.util.names import name_scope
|
||||
import numpy as np
|
||||
|
||||
|
||||
class MiddlewareEmbedder:
|
||||
class MiddlewareEmbedder(object):
|
||||
def __init__(self, activation_function=neon.Rectlin(), name="middleware_embedder"):
|
||||
self.name = name
|
||||
self.input = None
|
||||
|
||||
Reference in New Issue
Block a user