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

Add GBDT example #379

Merged
merged 1 commit into from
Jul 15, 2020
Merged

Add GBDT example #379

merged 1 commit into from
Jul 15, 2020

Conversation

aymericdamien
Copy link
Owner

No description provided.

@aymericdamien aymericdamien merged commit 86fc318 into master Jul 15, 2020
@aymericdamien aymericdamien deleted the update branch July 26, 2020 19:35
flyworker pushed a commit to nebulaai/TensorFlow-Examples that referenced this pull request Nov 17, 2020
* Update dcgan.py (aymericdamien#320)

correct some misunderstanding comments

* add new examples

* update docs

* small fixes

* fix docs

* add word2vec for TF2.0

* Update tensorflow v2 installation

* A minor mistake in cross entropy loss (aymericdamien#357)

tf.reduce_mean(-tf.reduce_sum(y_true * tf.math.log(y_pred),1)) or else it simply finds the sum and the reduced mean remains the sum itself.

* Update convolutional_network_raw.ipynb (aymericdamien#366)

* Update neural_network.ipynb (aymericdamien#361)

Add the missing fully connected layer 2 in the RNN example

* output layer aactivation, add fc2 in call (aymericdamien#358)

softmax applied during training phase to output layer and fc2 layer is unused

Co-authored-by: Aymeric Damien <aymeric.damien@gmail.com>

* make TensorFlow 2 examples compatible with Python 3 (aymericdamien#339)

* update docs (aymericdamien#367)

* Modify tf2 linear regression loss function (aymericdamien#371)

* Modify linear regression loss function (aymericdamien#373)

* Modify tf2 linear regression loss function

* neural_network.ipynp syntax error has been corrected

* fix links in README of TensorFlow_v1 (aymericdamien#374)

* Update README.md

* Update README.md

* Update README.md

* Fix links

* Update README.md

* add GBDT example (aymericdamien#379)

* Add tensorboard example (aymericdamien#381)

* add tensorboard example

* fix desc

* add tensorboard run cmd

* fix ml intro

* fix ml intro

* Fix ML intro notebook (aymericdamien#382)

* fix ml intro

* fix ml intro

* Update bidirectional_rnn.ipynb (aymericdamien#380)

Replace broken link for Sepp Hochreiter & Jurgen Schmidhuber's LSTM document.

* MultiGPU Training Example (aymericdamien#387)

* fix ml intro

* fix ml intro

* add multi gpu example

* add multi gpu example

* fix multigpu typo

Co-authored-by: 陈敏华 <chenmh@shanghaitech.edu.cn>
Co-authored-by: aymericdamien <aymeric.damien@gmail.com>
Co-authored-by: Nikhil Kilari <36819773+kilarinikhil@users.noreply.github.com>
Co-authored-by: lkdmttg7 <inprovertmer07@gmail.com>
Co-authored-by: Dragon-Yu <769888056@qq.com>
Co-authored-by: Sebastian Stein <seb.kde@hpfsc.de>
Co-authored-by: Hossein Sheikhi Darani <64957461+HosseinSheikhi@users.noreply.github.com>
Co-authored-by: Qingxu Zhu <49614979+ZQX323@users.noreply.github.com>
Co-authored-by: LCB0B <slavonie@gmail.com>
@jbrepogmailcom
Copy link

Hello, seems like this example does not work anymore because features were deprecated:

2022-02-25 15:44:55.014545: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
WARNING:tensorflow:From /home/janbenes/.local/lib/python3.9/site-packages/tensorflow/python/util/lazy_loader.py:59: The name tf.estimator.inputs is deprecated. Please use tf.compat.v1.estimator.inputs instead.

WARNING:tensorflow:From /home/janbenes/GBDT.py:45: The name tf.estimator.inputs.numpy_input_fn is deprecated. Please use tf.compat.v1.estimator.inputs.numpy_input_fn instead.

WARNING:tensorflow:From /home/janbenes/GBDT.py:57: BoostedTreesClassifier.init (from tensorflow_estimator.python.estimator.canned.boosted_trees) is deprecated and will be removed in a future version.
Instructions for updating:
Boosted Trees kernels in TF are deprecated. Please use TensorFlow Decision Forests instead (https://github.com/tensorflow/decision-forests)
WARNING:tensorflow:Using temporary folder as model directory: /tmp/tmp7dreu5fa
WARNING:tensorflow:From /home/janbenes/.local/lib/python3.9/site-packages/tensorflow/python/training/training_util.py:396: Variable.initialized_value (from tensorflow.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Use Variable.read_value. Variables in 2.X are initialized automatically both in eager and graph (inside tf.defun) contexts.
2022-02-25 15:44:56.930293: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2022-02-25 15:44:56.930317: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
WARNING:tensorflow:From /home/janbenes/.local/lib/python3.9/site-packages/tensorflow_estimator/python/estimator/inputs/queues/feeding_queue_runner.py:60: QueueRunner.init (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the tf.data module.
WARNING:tensorflow:From /home/janbenes/.local/lib/python3.9/site-packages/tensorflow_estimator/python/estimator/inputs/queues/feeding_functions.py:491: add_queue_runner (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the tf.data module.
WARNING:tensorflow:Issue encountered when serializing resources.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'_Resource' object has no attribute 'name'
WARNING:tensorflow:From /home/janbenes/.local/lib/python3.9/site-packages/tensorflow/python/training/monitored_session.py:914: start_queue_runners (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the tf.data module.
WARNING:tensorflow:Issue encountered when serializing resources.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'_Resource' object has no attribute 'name'
WARNING:tensorflow:Issue encountered when serializing resources.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'_Resource' object has no attribute 'name'
WARNING:tensorflow:It seems that global step (tf.train.get_global_step) has not been increased. Current value (could be stable): 0 vs previous value: 0. You could increase the global step by passing tf.train.get_global_step() to Optimizer.apply_gradients or Optimizer.minimize.
WARNING:tensorflow:It seems that global step (tf.train.get_global_step) has not been increased. Current value (could be stable): 0 vs previous value: 0. You could increase the global step by passing tf.train.get_global_step() to Optimizer.apply_gradients or Optimizer.minimize.
WARNING:tensorflow:It seems that global step (tf.train.get_global_step) has not been increased. Current value (could be stable): 0 vs previous value: 0. You could increase the global step by passing tf.train.get_global_step() to Optimizer.apply_gradients or Optimizer.minimize.
WARNING:tensorflow:It seems that global step (tf.train.get_global_step) has not been increased. Current value (could be stable): 0 vs previous value: 0. You could increase the global step by passing tf.train.get_global_step() to Optimizer.apply_gradients or Optimizer.minimize.
WARNING:tensorflow:It seems that global step (tf.train.get_global_step) has not been increased. Current value (could be stable): 0 vs previous value: 0. You could increase the global step by passing tf.train.get_global_step() to Optimizer.apply_gradients or Optimizer.minimize.
WARNING:tensorflow:Issue encountered when serializing resources.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'_Resource' object has no attribute 'name'
WARNING:tensorflow:From /home/janbenes/.local/lib/python3.9/site-packages/tensorflow_estimator/python/estimator/canned/head.py:635: auc (from tensorflow.python.ops.metrics_impl) is deprecated and will be removed in a future version.
Instructions for updating:
The value of AUC returned by this may race with the update so this is deprecated. Please use tf.keras.metrics.AUC instead.
WARNING:tensorflow:Trapezoidal rule is known to produce incorrect PR-AUCs; please switch to "careful_interpolation" instead.
WARNING:tensorflow:Trapezoidal rule is known to produce incorrect PR-AUCs; please switch to "careful_interpolation" instead.
WARNING:tensorflow:Issue encountered when serializing resources.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'_Resource' object has no attribute 'name'
WARNING:tensorflow:Trapezoidal rule is known to produce incorrect PR-AUCs; please switch to "careful_interpolation" instead.
WARNING:tensorflow:Trapezoidal rule is known to produce incorrect PR-AUCs; please switch to "careful_interpolation" instead.
WARNING:tensorflow:From /home/janbenes/GBDT.py:86: BoostedTreesRegressor.init (from tensorflow_estimator.python.estimator.canned.boosted_trees) is deprecated and will be removed in a future version.
Instructions for updating:
Boosted Trees kernels in TF are deprecated. Please use TensorFlow Decision Forests instead (https://github.com/tensorflow/decision-forests)
WARNING:tensorflow:Using temporary folder as model directory: /tmp/tmpdsqjlm3a
WARNING:tensorflow:Issue encountered when serializing resources.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'_Resource' object has no attribute 'name'
WARNING:tensorflow:Issue encountered when serializing resources.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'_Resource' object has no attribute 'name'
WARNING:tensorflow:Issue encountered when serializing resources.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'_Resource' object has no attribute 'name'
WARNING:tensorflow:Issue encountered when serializing resources.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'_Resource' object has no attribute 'name'
WARNING:tensorflow:Issue encountered when serializing resources.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'_Resource' object has no attribute 'name'

@xy-always
Copy link

xy-always commented Feb 25, 2022 via email

@jiandandema
Copy link

jiandandema commented Feb 25, 2022 via email

@jbrepogmailcom
Copy link

Finally got it working

@jbrepogmailcom
Copy link

I have other question. Can you please advise how to use "Gradient Boosted Decision Tree (GBDT)" example? The description says that Rergression function can be used to estimate house price based on attributes. How to do it please?

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.

4 participants