Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xDeepfm can't save model #1

Open
RisanLi opened this issue Mar 6, 2020 · 0 comments
Open

xDeepfm can't save model #1

RisanLi opened this issue Mar 6, 2020 · 0 comments

Comments

@RisanLi
Copy link

RisanLi commented Mar 6, 2020

If I code 'model.save_weights(...)' after model.fit in xDeepfm, then i get the traceback:

Traceback (most recent call last):
File "train_xdeepfm.py", line 74, in
model.save_weights('weights/test.h5')
File "/home/lixiang/anaconda3/envs/env_tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/network.py", line 1074, in save_weights
saving.save_weights_to_hdf5_group(f, self.layers)
File "/home/lixiang/anaconda3/envs/env_tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/saving/hdf5_format.py", line 631, in save_weights_to_hdf5_group
param_dset = g.create_dataset(name, val.shape, dtype=val.dtype)
File "/home/lixiang/anaconda3/envs/env_tf2/lib/python3.6/site-packages/h5py/_hl/group.py", line 139, in create_dataset
self[name] = dset
File "/home/lixiang/anaconda3/envs/env_tf2/lib/python3.6/site-packages/h5py/_hl/group.py", line 373, in setitem
h5o.link(obj.id, self.id, name, lcpl=lcpl, lapl=self._lapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5o.pyx", line 202, in h5py.h5o.link
RuntimeError: Unable to create link (name already exists)

However i changed model from xdeepfm to deepfm, model.save_weights() ran successfully.
Whats wrong with the xdeepfm ?

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant