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

Updated notebook to run on TensorFlow 2.18.0 #19

Open
wants to merge 45 commits into
base: master
Choose a base branch
from

Conversation

seyedrezamirkhani
Copy link

Updated regression.ipynb

  • When calling the fit method, TensorFlow complains that the data isn't in the correct input shape. The solution is to put the numeric input parameter, which is an array of numbers, as the last input parameter for the model.

  • The y_eval and y_train parameters to the fit method need to be 2 dimensional arrays when used with the ziln loss function. I've updated this code block to reflect this.

  • Updated the script block to a bash block, as script it is no longer supported. In doing this, the code around downloading and unzipping the data files has been modified to only run if the files do not exist already.

  • Reused DATA_FOLDER variable where possible to avoid hard coding paths.

  • Changed the default path for the related data and output files to be in the local tmp directory where the notebook is stored. This avoids problems with people not having access to the default root tmp folder. The path name has also been made shorter.

Update to setup.py

update package name to scikit-learn

Added .gitignore

This file includesjupyternotebook/python and tmp folder created by regression.ipynb

Thank you for writing your excellent paper+code and sharing it along with the data!

…e features are added to the model. The trick is to add the numeric features last!
…s caused by this loss function expecting the y target array to be 2-dimensional. This is changed by using the following code pattern reshaped_arr = arr[:, np.newaxis]
…and unzip files if they do not already exists
Copy link

google-cla bot commented Nov 27, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@miaojingang
Copy link
Contributor

Thanks @seyedrezamirkhani for the PR. Unfortunately the original owners all have either left Google or moved to different teams and do not have the privilege needed to approve PRs. I'd develop in a fork instead.

@seyedrezamirkhani
Copy link
Author

seyedrezamirkhani commented Dec 5, 2024 via email

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

Successfully merging this pull request may close these issues.

2 participants