def test_time_series_input_node(): # TODO. Change test once TimeSeriesBlock is added. node = ak.TimeseriesInput(shape=(32, ), lookback=2) output = node.build() assert isinstance(output, tf.Tensor) node = graph_module.deserialize(graph_module.serialize(node)) output = node.build() assert isinstance(output, tf.Tensor)
def test_timeseries_block(): block = wrapper.TimeseriesBlock() hp = kerastuner.HyperParameters() block.column_names = ['0', '1'] block.column_types = { '0': adapters.NUMERICAL, '1': adapters.NUMERICAL, } block = graph_module.deserialize(graph_module.serialize(block)) block.column_names = ['0', '1'] block.column_types = { '0': adapters.NUMERICAL, '1': adapters.NUMERICAL, } output = block.build(hp, ak.TimeseriesInput(shape=(32, ), lookback=2).build()) assert isinstance(output, tf.Tensor)
def test_time_series_input_node_deserialize_build_to_tensor(): node = ak.TimeseriesInput(shape=(32, ), lookback=2) node = nodes.deserialize(nodes.serialize(node)) node.shape = (32, ) output = node.build(kerastuner.HyperParameters()) assert isinstance(output, tf.Tensor)