jangmino / din_tf_eager Goto Github PK
View Code? Open in Web Editor NEWAn implementation of Deep Interest Network on TensorFlow eager
An implementation of Deep Interest Network on TensorFlow eager
Hi jangmino,
which TF version you are using?
When I train you model, this happens.
do you have any idea about this error?
def loss(inputs, labels):
print(labels.dtype)
logits = model(inputs, training=True)
print(logits.dtype)
return tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(
logits=logits,
labels=labels)
)
val_grad_fn = tfe.implicit_value_and_gradients(loss)
Elapsed total 19.62031316757202 : model 4.2279510498046875
<dtype: 'int32'>
<dtype: 'float32'>
Traceback (most recent call last):
File "model.py", line 384, in <module>
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "/home/ubuntu/hdd1/zip_data/Paul/miniconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "model.py", line 335, in main
train_one_epoch(epoch_i=i, train_data=ds_train, log_interval=FLAGS.log_interval, **model_objects)
File "model.py", line 264, in train_one_epoch
value, grads_and_vars = val_grad_fn((u, i, i_c, ts, hist_c, sl), y)
File "/home/ubuntu/hdd1/zip_data/Paul/miniconda3/lib/python3.6/site-packages/tensorflow/python/eager/backprop.py", line 203, in grad_fn
end_node = f(*args, **kwds)
File "model.py", line 249, in loss
labels=labels)
File "/home/ubuntu/hdd1/zip_data/Paul/miniconda3/lib/python3.6/site-packages/tensorflow/python/ops/nn_impl.py", line 181, in sigmoid_cross_entropy_with_logits
relu_logits - logits * labels,
File "/home/ubuntu/hdd1/zip_data/Paul/miniconda3/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 850, in binary_op_wrapper
return func(x, y, name=name)
File "/home/ubuntu/hdd1/zip_data/Paul/miniconda3/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 1094, in _mul_dispatch
return gen_math_ops.mul(x, y, name=name)
File "/home/ubuntu/hdd1/zip_data/Paul/miniconda3/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 4959, in mul
_six.raise_from(_core._status_to_exception(e.code, message), None)
File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: cannot compute Mul as input #0 was expected to be a int32 tensor but is a float tensor [Op:Mul] name: logistic_loss/mul/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.