Closed yenhao closed 4 years ago
Thanks for raising the issue! This is caused by an underlying bug in TensorFlow, the fix for which is on master but not in TensorFlow 2.1.0-rc1/2.1.0-rc2. Since the NSL tutorials currently seem to be using TF 2.1.0-rc1, they are impacted by this bug.
We have reached out to the TensorFlow team on how to work around this and will get back to you once we hear from them.
Hi @yenhao, thanks for your patience. We are going to update the NSL graph tutorials to use TF 2.2.x instead to work around the TF bug in v2.1.
Hi, I'm having the same problem in Colab, and I can't install the 2.2.x version. Do you know how can I do it in colab? the latest version available with pip is 2.1...
Hi @basque21, both the NSL graph tutorials should be working and use a nightly build of TF 2.2.x. In particular, they use the following command:
pip install --quiet tf-nightly==2.2.0.dev20200119
Hope this helps.
@arjung Can you please reconfirm the version # ? ERROR: No matching distribution found for tf-nightly==2.2.0.dev20200119
@vinayprabhu , thanks for your comment. Unfortunately that version no longer exists on PyPi. Our tutorials for graph regularization are currently using the following nightly build version: 2.2.0.dev20200218
.
This version will be subject to change until the underlying TensorFlow bug is fixed in TF 2.2.0.
I upgraded to 2.2.0rc1 and i get this error when the fit of the base model is called:
/python3.7/site-packages/tensorflow/python/keras/engine/input_spec.py:216 assert_input_compatibility ' but received input with shape ' + str(shape))
ValueError: Input 0 of layer dense is incompatible with the layer: expected axis -1 of input shape to have value 1433 but received input with shape [None, 1]
Which nightly version is currently being used for your tutorials for graph regularization? ERROR: No matching distribution found for tf-nightly==2.2.0.dev20200218
Thanks @basirshariat and @aczw900! We updated our graph regularization tutorials in https://github.com/tensorflow/neural-structured-learning/commit/f4b302c0e00c9f90ee93393b5c7bfbb715bc929d to use TF 2.0.1
, which is a stable version.
We are actively looking into getting this addressed soon for TF 2.2
, which is still undergoing development.
This should no longer be an issue since TF 2.2.0 has been released. Sorry about the version complications, things will be much simpler now.
https://github.com/tensorflow/neural-structured-learning/commit/edead04aa3be59f07baea52fc2cf22c320cdaff5 updates the neural graph learning tutorials to use the default TF version in colab.
Hello
The ValueError error
Insufficient elements in branch_graphs[0].outputs.
is found in both Neural Graph Learning tutorials (sentiment and document classification).Both happen during the training of
graph_reg_model.fit()
process. The error messages are shown below, I think it is due to the same issue.Thanks