complete fully stateful!
use black to format all files!
This commit is contained in:
@@ -4,35 +4,27 @@ from .func_fit import FuncFit
|
||||
|
||||
|
||||
class XOR3d(FuncFit):
|
||||
|
||||
def __init__(self, error_method: str = 'mse'):
|
||||
def __init__(self, error_method: str = "mse"):
|
||||
super().__init__(error_method)
|
||||
|
||||
@property
|
||||
def inputs(self):
|
||||
return np.array([
|
||||
[0, 0, 0],
|
||||
[0, 0, 1],
|
||||
[0, 1, 0],
|
||||
[0, 1, 1],
|
||||
[1, 0, 0],
|
||||
[1, 0, 1],
|
||||
[1, 1, 0],
|
||||
[1, 1, 1],
|
||||
])
|
||||
return np.array(
|
||||
[
|
||||
[0, 0, 0],
|
||||
[0, 0, 1],
|
||||
[0, 1, 0],
|
||||
[0, 1, 1],
|
||||
[1, 0, 0],
|
||||
[1, 0, 1],
|
||||
[1, 1, 0],
|
||||
[1, 1, 1],
|
||||
]
|
||||
)
|
||||
|
||||
@property
|
||||
def targets(self):
|
||||
return np.array([
|
||||
[0],
|
||||
[1],
|
||||
[1],
|
||||
[0],
|
||||
[1],
|
||||
[0],
|
||||
[0],
|
||||
[1]
|
||||
])
|
||||
return np.array([[0], [1], [1], [0], [1], [0], [0], [1]])
|
||||
|
||||
@property
|
||||
def input_shape(self):
|
||||
|
||||
Reference in New Issue
Block a user