Closed arsyad-ah closed 3 years ago
Hi! Thanks for reaching out. In the following line:
https://github.com/dorarad/gansformer/blob/main/dnnlib/tflib/custom_ops.py#L130
Try changing int(tf_ver < 1.15)
to 0
.
Then you should clean the custom ops built so that you can retry: rm -rf /home/test/dnnlib/tflib/_cudacache
and then try to run the code again. Let me know if you keep having issues on that!
Source solution: https://github.com/lmb-freiburg/demon/issues/26
Thanks for the quick reply!
I managed to solve that issue, but have another when generating images.
2021-04-06 14:15:44 UTC -- Traceback (most recent call last):
2021-04-06 14:15:44 UTC -- File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1356, in _do_call
2021-04-06 14:15:44 UTC -- return fn(*args)
2021-04-06 14:15:44 UTC -- File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1341, in _run_fn
2021-04-06 14:15:44 UTC -- options, feed_dict, fetch_list, target_list, run_metadata)
2021-04-06 14:15:44 UTC -- File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1429, in _call_tf_sessionrun
2021-04-06 14:15:44 UTC -- run_metadata)
2021-04-06 14:15:44 UTC -- tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'FusedBiasAct' used by {{node Gs/_Run/Gs/G_mapping/AttLayer_0/FusedBiasAct}}with these attrs: [gain=1, T=DT_FLOAT, axis=1, alpha=0, grad=0, act=1]
2021-04-06 14:15:44 UTC -- Registered devices: [CPU, XLA_CPU]
2021-04-06 14:15:44 UTC -- Registered kernels:
2021-04-06 14:15:44 UTC -- device='GPU'; T in [DT_HALF]
2021-04-06 14:15:44 UTC -- device='GPU'; T in [DT_FLOAT]
2021-04-06 14:15:44 UTC --
2021-04-06 14:15:44 UTC -- [[Gs/_Run/Gs/G_mapping/AttLayer_0/FusedBiasAct]]
2021-04-06 14:15:44 UTC --
2021-04-06 14:15:44 UTC -- During handling of the above exception, another exception occurred:
2021-04-06 14:15:44 UTC --
2021-04-06 14:15:44 UTC -- Traceback (most recent call last):
2021-04-06 14:15:44 UTC -- File "generate.py", line 53, in <module>
2021-04-06 14:15:44 UTC -- main()
2021-04-06 14:15:44 UTC -- File "generate.py", line 46, in main
2021-04-06 14:15:44 UTC -- run(**vars(args))
2021-04-06 14:15:44 UTC -- File "generate.py", line 28, in run
2021-04-06 14:15:44 UTC -- minibatch_size = batch_size, verbose = True)[0]
2021-04-06 14:15:44 UTC -- File "/home/test/dnnlib/tflib/network.py", line 488, in run
2021-04-06 14:15:44 UTC -- mb_out = tf.get_default_session().run(out_expr, dict(zip(in_expr, mb_in)))
2021-04-06 14:15:44 UTC -- File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 950, in run
2021-04-06 14:15:44 UTC -- run_metadata_ptr)
2021-04-06 14:15:44 UTC -- File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1173, in _run
2021-04-06 14:15:44 UTC -- feed_dict_tensor, options, run_metadata)
2021-04-06 14:15:44 UTC -- File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1350, in _do_run
2021-04-06 14:15:44 UTC -- run_metadata)
2021-04-06 14:15:44 UTC -- File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1370, in _do_call
2021-04-06 14:15:44 UTC -- raise type(e)(node_def, op, message)
2021-04-06 14:15:44 UTC -- tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'FusedBiasAct' used by node Gs/_Run/Gs/G_mapping/AttLayer_0/FusedBiasAct (defined at <string>:96) with these attrs: [gain=1, T=DT_FLOAT, axis=1, alpha=0, grad=0, act=1]
2021-04-06 14:15:44 UTC -- Registered devices: [CPU, XLA_CPU]
2021-04-06 14:15:44 UTC -- Registered kernels:
2021-04-06 14:15:44 UTC -- device='GPU'; T in [DT_HALF]
2021-04-06 14:15:44 UTC -- device='GPU'; T in [DT_FLOAT]
2021-04-06 14:15:44 UTC --
2021-04-06 14:15:44 UTC -- [[Gs/_Run/Gs/G_mapping/AttLayer_0/FusedBiasAct]]
2021-04-06 14:15:44 UTC --
2021-04-06 14:15:44 UTC -- Errors may have originated from an input operation.
2021-04-06 14:15:44 UTC -- Input Source operations connected to node Gs/_Run/Gs/G_mapping/AttLayer_0/FusedBiasAct:
2021-04-06 14:15:44 UTC -- Gs/_Run/Gs/G_mapping/AttLayer_0/mul_1 (defined at <string>:273)
2021-04-06 14:15:44 UTC -- Gs/_Run/Gs/G_mapping/AttLayer_0/Const_1 (defined at /home/test/dnnlib/tflib/ops/fused_bias_act.py:99)
2021-04-06 14:15:44 UTC -- Gs/_Run/Gs/G_mapping/AttLayer_0/MatMul (defined at <string>:247)
2021-04-06 14:15:46 UTC -- error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1
Note that the codebase builts two custom tensorflow operations and it seems that that's the source of the issue. It looks like you might have some mismatch between CUDA and the tensorflow version you use? https://github.com/tensorflow/tensorflow/issues/26600 may be helpful for the issue you mention!
Yup that is right. Seems to be some mismatch between CUDA and TF, but solved it when I was using docker. Thanks for the help!
That's great happy to hear that!
Hi,
I'm trying to dockerize using this image - tensorflow/tensorflow:1.14.0-gpu-py3.
However, I am getting this error:
Please help to check and advise. Thanks!