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
- nD tensor with shape: ``(batch_size, ..., input_dim)``. The most common situation would be a 2D input with shape ``(batch_size, input_dim)``.
260
257
261
258
Output shape
262
-
- nD tensor with shape: ``(batch_size, ..., hidden_size[-1])``. For instance, for a 2D input with shape `(batch_size, input_dim)`, the output would have shape ``(batch_size, hidden_size[-1])``.
259
+
- nD tensor with shape: ``(batch_size, ..., hidden_size[-1])``. For instance, for a 2D input with shape ``(batch_size, input_dim)``, the output would have shape ``(batch_size, hidden_size[-1])``.
263
260
264
261
Arguments
265
262
- **hidden_size**:list of positive integer, the layer number and units in each layer.
To save/load weights,you can write codes just like any other keras models.
6
+
7
+
.. code-block:: python
8
+
9
+
model = DeepFM()
10
+
model.save_weights('DeepFM_w.h5')
11
+
model.load_weights('DeepFM_w.h5')
12
+
13
+
14
+
To save/load models,just a little different.
15
+
16
+
.. code-block:: python
17
+
18
+
from tensorflow.python.keras.models import save_model,load_model
19
+
model = DeepFM()
20
+
save_model(model, 'DeepFM.h5')# save_model, same as before
21
+
22
+
from deepctr.utils import custom_objects
23
+
model = load_model('DeepFM.h5',custom_objects)# load_model,just add a parameter
24
+
25
+
2. Does the models support multi-value input?
26
+
27
+
Now only the `DIN <Features.html#din-deep-interest-network>`_ model support multi-value input,you can use layers in `sequence <deepctr.sequence.html>`_ to build your own models!
description="DeepCTR is a Easy-to-use,Modular and Extendible package of deep-learning based CTR models ,including serval DNN-based CTR models and lots of core components layer of the models which can be used to build your own custom model.",
0 commit comments