Why does tensorflow version 2.5 and above work and 2.4 and below not?
-
I needed to use the older version of tensorflow to work with. https://github.com/hunglc007/tensorflow-yolov4-tflite The repository, as it uses version 2.3, and trying to use the last version 2.6, I got a mistake in converting from tf to tflite. But by setting tensorflow 2.3, and just importing it, I got this kind of mistake column:
import tensorflow
ImportError Traceback (most recent call last)
E:\PitonGandon\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
63 try:
---> 64 from tensorflow.python._pywrap_tensorflow_internal import *
65 # This try catch logic is because there is no bazel equivalent for py_extension.ImportError: DLL load failed with error code 3221225501 while importing _pywrap_tensorflow_internal
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-1-d6579f534729> in <module>
----> 1 import tensorflowE:\PitonGandon\lib\site-packages\tensorflow_init_.py in <module>
39 import sys as _sys
40
---> 41 from tensorflow.python.tools import module_util as _module_util
42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
43E:\PitonGandon\lib\site-packages\tensorflow\python_init_.py in <module>
38 # pylint: disable=wildcard-import,g-bad-import-order,g-import-not-at-top
39
---> 40 from tensorflow.python.eager import context
41
42 # pylint: enable=wildcard-importE:\PitonGandon\lib\site-packages\tensorflow\python\eager\context.py in <module>
33 from tensorflow.core.protobuf import config_pb2
34 from tensorflow.core.protobuf import rewriter_config_pb2
---> 35 from tensorflow.python import pywrap_tfe
36 from tensorflow.python import tf2
37 from tensorflow.python.client import pywrap_tf_sessionE:\PitonGandon\lib\site-packages\tensorflow\python\pywrap_tfe.py in <module>
26
27 # pylint: disable=invalid-import-order,g-bad-import-order, wildcard-import, unused-import
---> 28 from tensorflow.python import pywrap_tensorflow
29 from tensorflow.python._pywrap_tfe import *E:\PitonGandon\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in <module>
81 for some common reasons and solutions. Include the entire stack trace
82 above this error message when asking for help.""" % traceback.format_exc()
---> 83 raise ImportError(msg)
84
85 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-longImportError: Traceback (most recent call last):
File "E:\PitonGandon\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed with error code 3221225501 while importing _pywrap_tensorflow_internalFailed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Then I tried 2.2 and 2.4, but they made the same mistake, and then I fixed 2.5, which worked well, but it didn't work.
I redesigned the anacondu, all the vs c++ libraries and the cudnn version of the table on the tensorflow, but nothing changed.
On the tensorflow site, I didn't find any mistakes with that code.
What's the problem?
-
Answer for those who face a mistake
DLL load failed with error code 3221225501 while importing _pywrap_tensorflow_internal
This error arises when attempting to implement AVX instructions in processors that do not support the extension of AVX. Library
_pywrap_tensorflow_internal
meets with AVX support from 1.6.0.If you've faced such a mistake, there are three ways to solve the problem:
- Find a computer with a processor that supports and works on AVX.
- Find Tensorflow without AVX
- Gather TF on your own car.