tensorflow / tensorboard

TensorFlow's Visualization Toolkit
Apache License 2.0
6.72k stars 1.66k forks source link

Unable to view Graph properly in Tensorboard #5213

Closed iumyx2612 closed 3 years ago

iumyx2612 commented 3 years ago

Consider Stack Overflow for getting support using TensorBoard—they have a larger community with better searchability:

https://stackoverflow.com/questions/tagged/tensorboard

Do not use this template for for setup, installation, or configuration issues. Instead, use the “installation problem” issue template:

https://github.com/tensorflow/tensorboard/issues/new?template=installation_problem.md

To report a problem with TensorBoard itself, please fill out the remainder of this template.

Environment information (required)

Please run diagnose_tensorboard.py (link below) in the same environment from which you normally run TensorFlow/TensorBoard, and paste the output here:

Diagnostics

Diagnostics output `````` --- check: autoidentify INFO: diagnose_tensorboard.py version e43767ef2b648d0d5d57c00f38ccbd38390e38da --- check: general INFO: sys.version_info: sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0) INFO: os.name: nt INFO: os.uname(): N/A INFO: sys.getwindowsversion(): sys.getwindowsversion(major=10, minor=0, build=19043, platform=2, service_pack='') --- check: package_management INFO: has conda-meta: True INFO: $VIRTUAL_ENV: None --- check: installed_packages INFO: installed: tensorboard==2.5.0 INFO: installed: tensorflow==2.4.0 INFO: installed: tensorflow-estimator==2.4.0 INFO: installed: tensorboard-data-server==0.6.1 --- check: tensorboard_python_version INFO: tensorboard.version.VERSION: '2.5.0' --- check: tensorflow_python_version 2021-08-07 14:29:53.001417: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll INFO: tensorflow.__version__: '2.4.0' INFO: tensorflow.__git_version__: 'v2.4.0-rc4-71-g582c8d236cb' --- check: tensorboard_data_server_version INFO: data server binary: None --- check: tensorboard_binary_path INFO: which tensorboard: b'E:\\Anaconda\\envs\\TFOD\\Scripts\\tensorboard.exe\r\nE:\\Work work\\Python\\3.7\\Scripts\\tensorboard.exe\r\nE:\\Anaconda\\Scripts\\tensorboard.exe\r\n' --- check: addrinfos socket.has_ipv6 = True socket.AF_UNSPEC = socket.SOCK_STREAM = socket.AI_ADDRCONFIG = socket.AI_PASSIVE = Loopback flags: Loopback infos: [(, , 0, '', ('::1', 0, 0, 0)), (, , 0, '', ('127.0.0.1', 0))] Wildcard flags: Wildcard infos: [(, , 0, '', ('::', 0, 0, 0)), (, , 0, '', ('0.0.0.0', 0))] --- check: readable_fqdn INFO: socket.getfqdn(): 'DESKTOP-QLA1CN5' --- check: stat_tensorboardinfo INFO: directory: C:\Users\blabl\AppData\Local\Temp\.tensorboard-info INFO: os.stat(...): os.stat_result(st_mode=16895, st_ino=61361544923070597, st_dev=3932016171, st_nlink=1, st_uid=0, st_gid=0, st_size=4096, st_atime=1628321373, st_mtime=1628321373, st_c time=1618199102) INFO: mode: 0o40777 --- check: source_trees_without_genfiles INFO: tensorboard_roots (1): ['E:\\Anaconda\\envs\\TFOD\\lib\\site-packages']; bad_roots (0): [] --- check: full_pip_freeze INFO: pip freeze --all: absl-py==0.13.0 apache-beam==2.31.0 astunparse==1.6.3 attrs==21.2.0 avro-python3==1.10.2 cachetools==4.2.2 certifi==2021.5.30 cffi==1.14.6 charset-normalizer==2.0.1 colorama==0.4.4 contextlib2==21.6.0 crcmod==1.7 cycler==0.10.0 Cython==0.29.24 dataclasses==0.6 dill==0.3.1.1 dm-tree==0.1.6 docopt==0.6.2 fastavro==1.4.2 flatbuffers==1.12 future==0.18.2 gast==0.3.3 gin-config==0.4.0 google-api-core==1.31.0 google-api-python-client==2.13.0 google-auth==1.32.1 google-auth-httplib2==0.1.0 google-auth-oauthlib==0.4.4 google-cloud-bigquery==2.21.0 google-cloud-core==1.7.1 google-crc32c==1.1.2 google-pasta==0.2.0 google-resumable-media==1.3.1 googleapis-common-protos==1.53.0 grpcio==1.32.0 h5py==2.10.0 hdfs==2.6.0 httplib2==0.19.1 idna==3.2 importlib-resources==5.2.0 joblib==1.0.1 kaggle==1.5.12 keras-nightly==2.5.0.dev2021032900 Keras-Preprocessing==1.1.2 kiwisolver==1.3.1 lvis==0.5.3 lxml==4.6.3 Markdown==3.3.4 matplotlib==3.4.2 numpy==1.19.5 oauth2client==4.1.3 oauthlib==3.1.1 object-detection @ file:///E:/Work%20work/DATN/TFModels/models/research opencv-contrib-python==4.5.3.56 opencv-python==4.5.3.56 opencv-python-headless==4.5.3.56 opt-einsum==3.3.0 packaging==21.0 pandas==1.3.0 Pillow==8.3.1 pip==21.1.3 portalocker==2.0.0 promise==2.3 proto-plus==1.19.0 protobuf==3.17.3 psutil==5.8.0 py-cpuinfo==8.0.0 pyarrow==4.0.1 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycairo==1.20.1 pycocotools @ git+https://github.com/philferriere/cocoapi.git@2929bd2ef6b451054755dfd7ceb09278f935f7ad#subdirectory=PythonAPI pycparser==2.20 pydot==1.4.2 pymongo==3.12.0 pyparsing==2.4.7 python-dateutil==2.8.2 python-slugify==5.0.2 pytz==2021.1 pywin32==301 PyYAML==5.4.1 requests==2.26.0 requests-oauthlib==1.3.0 rsa==4.7.2 sacrebleu==1.5.1 scikit-learn==0.24.2 scipy==1.7.0 sentencepiece==0.1.96 seqeval==1.2.2 setuptools==52.0.0.post20210125 six==1.15.0 tensorboard==2.5.0 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.0 tensorflow==2.4.0 tensorflow-addons==0.13.0 tensorflow-datasets==4.3.0 tensorflow-estimator==2.4.0 tensorflow-hub==0.12.0 tensorflow-metadata==1.1.0 tensorflow-model-optimization==0.6.0 termcolor==1.1.0 text-unidecode==1.3 tf-models-official==2.4.0 tf-slim==1.1.0 threadpoolctl==2.2.0 tk==0.1.0 tqdm==4.61.2 typeguard==2.12.1 typing-extensions==3.7.4.3 uritemplate==3.0.1 urllib3==1.26.6 Werkzeug==2.0.1 wheel==0.36.2 wincertstore==0.2 wrapt==1.12.1 zipp==3.5.0 ``````

https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py

For browser-related issues, please additionally specify:

Issue description

I'm trying to visualize a *.pb model file on Tensorboard. I used import_pb_to_tensorboard to export a log and view it with Tensorboard When I launched Tensorboard it gave me these messages and the graph above

2021-08-07 14:31:58.527882: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
Serving TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all
TensorBoard 2.5.0 at http://localhost:6006/ (Press CTRL+C to quit)
WARNING:tensorflow:UnknownError: NewRandomAccessFile failed to Create/Open: models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log\.\..\checkpoint : Access is denied.
; Input/output error
W0807 14:32:05.433997 21880 checkpoint_management.py:295] UnknownError: NewRandomAccessFile failed to Create/Open: models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log
\.\..\checkpoint : Access is denied.
; Input/output error
WARNING:tensorflow:models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log\.\..\checkpoint: Checkpoint ignored
W0807 14:32:05.435991 21880 checkpoint_management.py:296] models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log\.\..\checkpoint: Checkpoint ignored
WARNING:tensorflow:UnknownError: NewRandomAccessFile failed to Create/Open: models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log\.\..\checkpoint : Access is denied.
; Input/output error
W0807 14:32:05.649509 20108 checkpoint_management.py:295] UnknownError: NewRandomAccessFile failed to Create/Open: models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log
\.\..\checkpoint : Access is denied.
; Input/output error
WARNING:tensorflow:models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log\.\..\checkpoint: Checkpoint ignored
W0807 14:32:05.650506 20108 checkpoint_management.py:296] models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log\.\..\checkpoint: Checkpoint ignored
WARNING:tensorflow:UnknownError: NewRandomAccessFile failed to Create/Open: models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log\.\..\checkpoint : Access is denied.
; Input/output error
W0807 14:32:08.171732 25200 checkpoint_management.py:295] UnknownError: NewRandomAccessFile failed to Create/Open: models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log
\.\..\checkpoint : Access is denied.
; Input/output error
WARNING:tensorflow:models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log\.\..\checkpoint: Checkpoint ignored
W0807 14:32:08.173725 25200 checkpoint_management.py:296] models\text_detection\faster_rcnn_resnet50_v1_800x1333\saved\6-8 (2)\log\.\..\checkpoint: Checkpoint ignored
stephanwlee commented 3 years ago

Hi @iumyx2612, those messages are mostly innocuous. Those are warnings (W0807 <- "W" stands for warn there) and they would not impact operations of TensorBoard.

Now, I see that the graph plugin is able to display something from your SavedModel. While the visualization is not ideal, is there a reason why you think you cannot "view Graph properly" in TensorBoard?

iumyx2612 commented 3 years ago

Hi @iumyx2612, those messages are mostly innocuous. Those are warnings (_W_0807 <- "W" stands for warn there) and they would not impact operations of TensorBoard.

Now, I see that the graph plugin is able to display something from your SavedModel. While the visualization is not ideal, is there a reason why you think you cannot "view Graph properly" in TensorBoard?

It doesn't give me the arrow from blocks to blocks, and I can't expand each block to see what's inside. And I think it should display each block clearly like the below image image

When I select on a block, I see "Subgraph: 12 nodes", Is there a way to expand this block? I want to display the full Graph if you know what I mean

image

stephanwlee commented 3 years ago

In TensorFlow 2, they now have a concept of FunctionLibrary (the name of the node has "__function_library__") which basically yanks some nodes out as a sub graphs and, for those, TensorBoard does not do a great job at displaying them. As such, it is naturally for those to miss edges as you have noted. However, you should be able to double click on the FunctionLibrary node to expand the content inside.

iumyx2612 commented 3 years ago

In TensorFlow 2, they now have a concept of FunctionLibrary (the name of the node has "function_library") which basically yanks some nodes out as a sub graphs and, for those, TensorBoard does not do a great job at displaying them. As such, it is naturally for those to miss edges as you have noted. However, you should be able to double click on the FunctionLibrary node to expand the content inside.

Thank you so much