aymericdamien / TensorFlow-Examples

TensorFlow Tutorial and Examples for Beginners (support TF v1 & v2)
Other
43.3k stars 14.98k forks source link

random_forest error #258

Open zhyongquan opened 5 years ago

zhyongquan commented 5 years ago

D:\PYProjects\tensorflow\Scripts\python.exe D:/PYProjects/tensorflow/examples/2_BasicModels/random_forest.py WARNING:tensorflow:From D:/PYProjects/tensorflow/examples/2_BasicModels/random_forest.py:23: read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version. Instructions for updating: Please use alternatives such as official/mnist/dataset.py from tensorflow/models. WARNING:tensorflow:From D:\PYProjects\tensorflow\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py:264: extract_images (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version. Instructions for updating: Please use tf.data to implement this functionality. Extracting D:\PYProjects\tensorflow\mnist\train-images-idx3-ubyte.gz WARNING:tensorflow:From D:\PYProjects\tensorflow\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py:270: extract_labels (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version. Extracting D:\PYProjects\tensorflow\mnist\train-labels-idx1-ubyte.gz Instructions for updating: Please use tf.data to implement this functionality. Extracting D:\PYProjects\tensorflow\mnist\t10k-images-idx3-ubyte.gz Extracting D:\PYProjects\tensorflow\mnist\t10k-labels-idx1-ubyte.gz WARNING:tensorflow:From D:\PYProjects\tensorflow\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py:295: DataSet.init (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version. Instructions for updating: Please use alternatives such as official/mnist/dataset.py from tensorflow/models. Traceback (most recent call last): File "D:\PYProjects\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 1589, in _create_c_op c_op = c_api.TF_FinishOperation(op_desc) tensorflow.python.framework.errors_impl.InvalidArgumentError: Op type not registered 'FertileStatsResourceHandleOp' in binary running on LT5CG7492Q4J. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed. while building NodeDef 'stats-0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:/PYProjects/tensorflow/examples/2_BasicModels/random_forest.py", line 45, in forest_graph = tensor_forest.RandomForestGraphs(hparams) File "D:\PYProjects\tensorflow\lib\site-packages\tensorflow\contrib\tensor_forest\python\tensor_forest.py", line 386, in init tree_configs=tree_configs, tree_stats=tree_stats) File "D:\PYProjects\tensorflow\lib\site-packages\tensorflow\contrib\tensor_forest\python\tensor_forest.py", line 357, in init params, i, training, kwargs)) File "D:\PYProjects\tensorflow\lib\site-packages\tensorflow\contrib\tensor_forest\python\tensor_forest.py", line 318, in init params, tree_stat, self.get_tree_name('stats', tree_num)) File "D:\PYProjects\tensorflow\lib\site-packages\tensorflow\contrib\tensor_forest\python\ops\stats_ops.py", line 102, in fertile_stats_variable container, shared_name=name, name=name) File "D:\PYProjects\tensorflow\lib\site-packages\tensorflow\contrib\tensor_forest\python\ops\gen_stats_ops.py", line 223, in fertile_stats_resource_handle_op shared_name=shared_name, name=name) File "D:\PYProjects\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "D:\PYProjects\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 3414, in create_op op_def=op_def) File "D:\PYProjects\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 1756, in init control_input_ops) File "D:\PYProjects\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 1592, in _create_c_op raise ValueError(str(e)) ValueError: Op type not registered 'FertileStatsResourceHandleOp' in binary running on LT5CG7492Q4J. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed. while building NodeDef 'stats-0'**

Process finished with exit code 1

ph0817sig commented 5 years ago

I solved it by install Ubuntu in windows, then activate jupyter notebook under Ubuntu.