You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There’s a need to introduce a new concept: Encoder which is a block that encodes features into some representation. This class can be used for prediction but can’t be trained/evaluated in isolation, only as part of a Model.
classEncoder(tf.keras.Model):
# Block that can be used for prediction but not for train/testdef__init__(
self,
inputs: Union[Schema, Block],
*blocks: Block,
pre: Optional[tf.keras.layers.Layer] =None,
post: Optional[tf.keras.layers.Layer] =None,
**kwargs,
):
...
@classmethoddeffor_tag(
cls,
schema,
tag,
*block,
):
...
defencode(
self,
dataset: merlin.io.Dataset,
id_col=None,
**kwargs
) ->merlin.io.Dataset:
...
defbatch_predict(
self,
dataset: merlin.io.Dataset,
output_schema: Optional[Schema] =None**kwargs
) ->merlin.io.Dataset:
...
defpredict(
self,
x,
batch_size=None,
verbose='auto',
steps=None,
callbacks=None,
max_queue_size=10,
workers=1,
use_multiprocessing=False
):
...
defsave(...):
# Save with input- & output-schema@propertydefschema(self) ->Schema:
...
@propertydefoutput_schema(self) ->Schema:
...
@propertydefinputs(self) ->Block:
...
The text was updated successfully, but these errors were encountered:
There’s a need to introduce a new concept:
Encoder
which is a block that encodes features into some representation. This class can be used for prediction but can’t be trained/evaluated in isolation, only as part of aModel
.The text was updated successfully, but these errors were encountered: