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

Train error #10

Open
neenerrh opened this issue Jul 22, 2021 · 2 comments
Open

Train error #10

neenerrh opened this issue Jul 22, 2021 · 2 comments

Comments

@neenerrh
Copy link

WARNING:tensorflow:From /content/ACKRec/layers.py:124: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
Traceback (most recent call last):
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/tensor_util.py", line 541, in make_tensor_proto
str_values = [compat.as_bytes(x) for x in proto_values]
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/tensor_util.py", line 541, in
str_values = [compat.as_bytes(x) for x in proto_values]
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/util/compat.py", line 71, in as_bytes
(bytes_or_text,))
TypeError: Expected binary or unicode string, got None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 40, in
model = GCN(placeholders=placeholders, input_dim=features.shape[1], num_support=num_support)
File "/content/ACKRec/models.py", line 125, in init
self.build()
File "/content/ACKRec/models.py", line 57, in build
hidden = self.layersi
File "/content/ACKRec/layers.py", line 184, in call
w_omega = tf.get_variable(initializer=tf.random.normal([hidden_size, self.attention_size], stddev=0.1), name='w_omega')
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/ops/random_ops.py", line 69, in random_normal
shape_tensor = tensor_util.shape_tensor(shape)
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/tensor_util.py", line 964, in shape_tensor
return ops.convert_to_tensor(shape, dtype=dtype, name="shape")
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/ops.py", line 1184, in convert_to_tensor
return convert_to_tensor_v2(value, dtype, preferred_dtype, name)
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/ops.py", line 1242, in convert_to_tensor_v2
as_ref=False)
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/ops.py", line 1297, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/constant_op.py", line 286, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/constant_op.py", line 227, in constant
allow_broadcast=True)
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/constant_op.py", line 265, in _constant_impl
allow_broadcast=allow_broadcast))
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/tensor_util.py", line 545, in make_tensor_proto
"supported type." % (type(values), values))
TypeError: Failed to convert object of type <class 'tuple'> to Tensor. Contents: (None, 32). Consider casting elements to a supported type.

@lc1092278895
Copy link

WARNING:tensorflow:From /content/ACKRec/layers.py:124: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version. Instructions for updating: Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob. Traceback (most recent call last): File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/tensor_util.py", line 541, in make_tensor_proto str_values = [compat.as_bytes(x) for x in proto_values] File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/tensor_util.py", line 541, in str_values = [compat.as_bytes(x) for x in proto_values] File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/util/compat.py", line 71, in as_bytes (bytes_or_text,)) TypeError: Expected binary or unicode string, got None

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "train.py", line 40, in model = GCN(placeholders=placeholders, input_dim=features.shape[1], num_support=num_support) File "/content/ACKRec/models.py", line 125, in init self.build() File "/content/ACKRec/models.py", line 57, in build hidden = self.layersi File "/content/ACKRec/layers.py", line 184, in call w_omega = tf.get_variable(initializer=tf.random.normal([hidden_size, self.attention_size], stddev=0.1), name='w_omega') File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/ops/random_ops.py", line 69, in random_normal shape_tensor = tensor_util.shape_tensor(shape) File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/tensor_util.py", line 964, in shape_tensor return ops.convert_to_tensor(shape, dtype=dtype, name="shape") File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/ops.py", line 1184, in convert_to_tensor return convert_to_tensor_v2(value, dtype, preferred_dtype, name) File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/ops.py", line 1242, in convert_to_tensor_v2 as_ref=False) File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/ops.py", line 1297, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/constant_op.py", line 286, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/constant_op.py", line 227, in constant allow_broadcast=True) File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/constant_op.py", line 265, in _constant_impl allow_broadcast=allow_broadcast)) File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/tensor_util.py", line 545, in make_tensor_proto "supported type." % (type(values), values)) TypeError: Failed to convert object of type <class 'tuple'> to Tensor. Contents: (None, 32). Consider casting elements to a supported type.

Were you able to solve this? I am trying to run it too.

@neenerrh
Copy link
Author

In te simple attention layer line 202, I simpy changed
hidden_size = inputs.shape[2].value

To

hidden_size = 64

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

2 participants