Files
tensorneat-mend/tensorneat/problem/func_fit/xor.py
wls2002 6aa9011043 modify pipeline for "update_by_data";
fix bug in speciate. currently, node_delete and conn_delete can successfully work
2024-05-31 15:32:56 +08:00

28 lines
481 B
Python

import numpy as np
from .func_fit import FuncFit
class XOR(FuncFit):
@property
def inputs(self):
return np.array(
[[0, 0], [0, 1], [1, 0], [1, 1]],
dtype=np.float32,
)
@property
def targets(self):
return np.array(
[[0], [1], [1], [0]],
dtype=np.float32,
)
@property
def input_shape(self):
return 4, 2
@property
def output_shape(self):
return 4, 1