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

debug code #11

Open
hcnhatnam opened this issue Apr 21, 2019 · 2 comments
Open

debug code #11

hcnhatnam opened this issue Apr 21, 2019 · 2 comments

Comments

@hcnhatnam
Copy link

hcnhatnam commented Apr 21, 2019

@yizt How to debug function like ctpn_target_graph() in target.py?I used pycharm to debug but value =tensor()...I want to see the specific values when putting an image into the network.

@yizt
Copy link
Owner

yizt commented Apr 21, 2019

@hcnhatnam 在train.py 中增加如下代码; 然后在命令行中:pt <tensor> 输出张量值

    from tensorflow.python import debug as tf_debug
    import keras.backend as K

    sess = K.get_session()
    sess = tf_debug.LocalCLIDebugWrapperSession(sess)
    K.set_session(sess)

@RabbearSu
Copy link

@hcnhatnam you can use the eager mode of tensorflow.
tf.enable_eager_execution(), then you can directly get the value.

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

No branches or pull requests

3 participants