Comments (3)
Please make sure to disable eager execution before using aimet_tensorflow.plotting_utils.visualize_weight_ranges_single_layer
API.
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
from aimet.
Hi @quic-hitameht , I disabled eager execution and ran the code, the error above shows after disabling eager execution mode only, can you please kindly check that. Thanks in advance.
from aimet.
Hi @quic-hitameht , Here is my code for visualization :
# TF specific imports
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
from tensorflow.keras.applications.resnet50 import ResNet50
# Import for starting Bokeh Server
from aimet_common.utils import start_bokeh_server_session
from aimet_tensorflow import plotting_utils
tf.compat.v1.keras.backend.clear_session()
model_resnet = ResNet50(weights='imagenet', input_shape=(224, 224, 3))
sess = tf.compat.v1.keras.backend.get_session()
with sess.as_default():
# Getting a layer for visualizaing its weight ranges
conv_op = sess.graph.get_operation_by_name('conv1_conv/Conv2D')
# Starting a Bokeh Server with port number 8001
visualization_url = start_bokeh_server_session(port=8001)
print(visualization_url)
results_dir='./aimet_vis'
plotting_utils.visualize_weight_ranges_single_layer(sess=sess, layer=conv_op, results_dir=results_dir)
sess.close()
I am getting the following output error and logs when i run the code:
2023-11-03 06:12:10.313710: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-11-03 06:12:10.313862: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-11-03 06:12:10.313922: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-11-03 06:12:10.314020: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-11-03 06:12:10.314116: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-11-03 06:12:10.314168: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1616] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1021 MB memory: -> device: 0, name: NVIDIA GeForce RTX 3050 Laptop GPU, pci bus id: 0000:01:00.0, compute capability: 8.6
INFO:bokeh.server.server:Starting Bokeh server version 1.2.0 (running on Tornado 6.3.3)
Process Process-4:
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/dist-packages/aimet_common/utils.py", line 278, in start_bokeh_server
server.run_until_shutdown()
File "/usr/local/lib/python3.8/dist-packages/bokeh/server/server.py", line 184, in run_until_shutdown
self._loop.start()
File "/usr/local/lib/python3.8/dist-packages/tornado/platform/asyncio.py", line 195, in start
self.asyncio_loop.run_forever()
File "/usr/lib/python3.8/asyncio/base_events.py", line 560, in run_forever
self._check_running()
File "/usr/lib/python3.8/asyncio/base_events.py", line 552, in _check_running
raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
INFO:bokeh.io.state:Session output file './aimet_vis/visualize_weight_ranges_single_layer.html' already exists, will be overwritten.
('http://localhost:8001/', <Process name='Process-4' pid=6131 parent=5892 started>)
When i open the link http://localhost:8001/ it says the site cant be reached and also I am getting RuntimeErrror: This event loop is already running
as can be seen from logs can you check what is the issue and can suggest any solution, Thank you in advance.
from aimet.
Related Issues (20)
- ImportError libpymo in AIMET 1.32 Pytorch 2.1.2+cu118 HOT 7
- CUDA ARCH 9.0 unsupported?
- RNN can not be quantized by aimet
- Fix device mismatch with blockwise api
- Added support for GridSample Op and made ScatterND op Jit tracable
- Unable to initialize class AimetTensorQuantizer: Cannot import AimetTensorQuantizer. Please build AimetTensorQuantizer and add artifact path to PYTHONPATH to resolve this issue HOT 2
- cache dataset is improperly built with inspect.param filed as defaults.
- Enable param renaming for export to onnx direct
- RmsNorm Op support
- I cannot install aimet-tf-cpu on ubuntu 20.04! HOT 2
- Register RmsNorm for quantization
- what's the quantization logic of LSTM
- Installation problem HOT 2
- Mark lazy quantize wrapper as unquantizable
- Keras QAT accuracy mismatch issue in Range Learning Scheme
- Assistance Needed for Saving ONNX Model in QDQ or QOperator Formats HOT 5
- Allow saving to external data for export to onnx direct
- Update matmul exception logic
- Using dict for dummy_input
- Update state dict for float quantizers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aimet.