-
Notifications
You must be signed in to change notification settings - Fork 132
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
train_dsin error #8
Comments
please update your code to the latest and run them on the environment written on |
I run this code on tf-cpu1.4.0, cause my cuda is 10.0 and cannot run on gpu. |
have you run your code on python3.6? |
right |
check your code is up to date with the the latest commit |
It is the latest commit with deepctr==0.4.1 |
yes i suggest you to clone the whole repo and re-run again |
ok thank you for your suggestion
| |
18201788952
邮箱:18201788952@163.com
|
Signature is customized by Netease Mail Master
On 09/08/2019 17:26, 浅梦 wrote:
yes i suggest you to reclone the whole repo and re-run again
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi, my friend, thank you for your work, I try to debug and find a tiny bug:in file - 0_gen_sampled_data.py:
in file - 2_gen_dsin_input.py:
here merge method lost some data(cate_id, and brand)
so here data['brand'].nunique() is small than input data index.and I log all unique input brand number, and update the fd, then code can run without error. |
I have also encountered this problem. Could you please tell me how to modify this bug in detail? |
Hi, I met the same problem, could you tell us how to fix the bug? |
Sorry for the late reply, I am not sure whether it is ok or not.
|
thank you too much, please let me try |
sorry for this mistake, we are planning to refactor our code in the future. sparse_feature_list = [SingleFeat(feat, data[feat].max(
) + 1) for feat in sparse_features + ['cate_id', 'brand']] instead of Lines 141 to 142 in 3aed781
|
Hi, I have got an error while run train_dsin.py, the info as follows:
Caused by op 'sparse_emb_14-brand/Gather_6', defined at:
File "train_dsin.py", line 52, in
att_embedding_size=1, bias_encoding=False)
File "/home/dedong/pycharmProjects/Emb4RS/models/DSIN/code/_models/dsin.py", line 85, in DSIN
sess_feature_list, sess_max_count, bias_encoding=bias_encoding)
File "/home/dedong/pycharmProjects/Emb4RS/models/DSIN/code/_models/dsin.py", line 154, in sess_interest_division
sparse_fg_list, sess_feture_list, sess_feture_list)
File "/home/dedong/anaconda3/envs/tf1.4/lib/python3.6/site-packages/deepctr/input_embedding.py", line 145, in get_embedding_vec_list
embedding_vec_list.append(embedding_dictfeat_name)
File "/home/dedong/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/engine/topology.py", line 252, in call
output = super(Layer, self).call(inputs, **kwargs)
File "/home/dedong/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 575, in call
outputs = self.call(inputs, *args, **kwargs)
File "/home/dedong/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/layers/embeddings.py", line 158, in call
out = K.gather(self.embeddings, inputs)
File "/home/dedong/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/backend.py", line 1351, in gather
return array_ops.gather(reference, indices)
File "/home/dedong/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 2486, in gather
params, indices, validate_indices=validate_indices, name=name)
File "/home/dedong/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1834, in gather
validate_indices=validate_indices, name=name)
File "/home/dedong/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/dedong/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2956, in create_op
op_def=op_def)
File "/home/dedong/anaconda3/envs/tf1.4/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1470, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InvalidArgumentError (see above for traceback): indices[0,0] = 136739 is not in [0, 79963)
[[Node: sparse_emb_14-brand/Gather_6 = Gather[Tindices=DT_INT32, Tparams=DT_FLOAT, validate_indices=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](sparse_emb_14-brand/embeddings/read, sparse_emb_14-brand/Cast_6)]]
do you know how to fix this, thanks!
The text was updated successfully, but these errors were encountered: