remove create_func....

This commit is contained in:
wls2002
2023-08-04 17:29:36 +08:00
parent c7fb1ddabe
commit 0e44b13291
29 changed files with 591 additions and 259 deletions

36
problem/func_fit/xor.py Normal file
View File

@@ -0,0 +1,36 @@
import numpy as np
from .func_fit import FuncFit, FuncFitConfig
class XOR(FuncFit):
def __init__(self, config: FuncFitConfig = FuncFitConfig()):
self.config = config
super().__init__(config)
@property
def inputs(self):
return np.array([
[0, 0],
[0, 1],
[1, 0],
[1, 1]
])
@property
def targets(self):
return np.array([
[0],
[1],
[1],
[0]
])
@property
def input_shape(self):
return (4, 2)
@property
def output_shape(self):
return (4, 1)