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

AttributeError: 'FigureCanvasBase' object has no attribute 'tostring_argb' #22

Open
huangshaoguang opened this issue Jun 1, 2019 · 0 comments

Comments

@huangshaoguang
Copy link

hello!Thank you for your generous sharing!There is some wrong when I train the NYU dataset.How to solve it?
AttributeError: 'FigureCanvasBase' object has no attribute 'tostring_argb'

     [[node pt_summary_1/Plot_1 (defined at D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tfplot\ops.py:114) ]]

Caused by op 'pt_summary_1/Plot_1', defined at:
File "hourglass_um_crop_tiny.py", line 918, in
run_train(dataset, val_dataset)
File "hourglass_um_crop_tiny.py", line 882, in run_train
train(model, restore_step)
File "..\model\train_single_gpu.py", line 59, in train
loss = model.loss(*batches)
File "hourglass_um_crop_tiny.py", line 419, in loss
tf.reshape(hm_uvd_pts, (3,-1,3))))
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tfplot\wrapper.py", line 87, in wrapped_fn
**merge_kwargs(kwargs, kwargs_call))
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tfplot\ops.py", line 167, in plot_many
im = plot(plot_func, arg, name=('Plot
%d' % k), **kwargs)
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tfplot\ops.py", line 114, in plot
name=name)
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tensorflow\python\util\deprecation.py", line 324, in new_func
return func(*args, **kwargs)
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tensorflow\python\ops\script_ops.py", line 468, in py_func
func=func, inp=inp, Tout=Tout, stateful=stateful, eager=False, name=name)
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tensorflow\python\ops\script_ops.py", line 282, in _internal_py_func
input=inp, token=token, Tout=Tout, name=name)
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tensorflow\python\ops\gen_script_ops.py", line 154, in py_func
"PyFunc", input=input, token=token, Tout=Tout, name=name)
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tensorflow\python\framework\ops.py", line 3300, in create_op
op_def=op_def)
File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tensorflow\python\framework\ops.py", line 1801, in init
self._traceback = tf_stack.extract_stack()

UnknownError (see above for traceback): AttributeError: 'FigureCanvasBase' object has no attribute 'tostring_argb'
Traceback (most recent call last):

File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tensorflow\python\ops\script_ops.py", line 207, in call
ret = func(*args)

File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tfplot\ops.py", line 101, in _render_image
image = figure.to_array(fig)

File "D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tfplot\figure.py", line 90, in to_array
img = np.frombuffer(fig.canvas.tostring_argb(), dtype=np.uint8)

AttributeError: 'FigureCanvasBase' object has no attribute 'tostring_argb'

     [[node pt_summary_1/Plot_1 (defined at D:\ProgramData\Anaconda3\envs\tfenv\lib\site-packages\tfplot\ops.py:114) ]]
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

1 participant