社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

正在尝试升级代码以使用带有Tensor flow的Python 3.10

AndrewW • 4 年前 • 634 次点击  

我想从你那里得到一些代码 https://github.com/AntonMu/TrainYourOwnYOLO.git 使用Python 3.10运行。我知道github页面上说的是python 3.6或3.7。然而,我设法让代码在python 3.9和 Keras-2.4.3 tensorflow-2.5.0

然而,我永远无法超越上面展示的tensorflow和keras版本。 现在,Python 3.10需要更高的版本

错误如下所示,但我不知道从哪里开始寻找任何想法?

022-03-05 18:42:21.056749: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:828] layout failed: INVALID_ARGUMENT: Subshape must have computed start >= end since stride is negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2022-03-05 18:42:21.112875: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:828] remapper failed: INVALID_ARGUMENT: Subshape must have computed start >= end since stride is negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2022-03-05 18:42:21.429968: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:828] remapper failed: INVALID_ARGUMENT: Subshape must have computed start >= end since stride is negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
Traceback (most recent call last):
  File "C:\Users\andrew\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow\python\client\session.py", line 1377, in _do_call
    return fn(*args)
  File "C:\Users\andrew\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow\python\client\session.py", line 1360, in _run_fn
    return self._call_tf_sessionrun(options, feed_dict, fetch_list,
  File "C:\Users\andrew\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow\python\client\session.py", line 1453, in _call_tf_sessionrun
    return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict,
tensorflow.python.framework.errors_impl.FailedPreconditionError: Could not find variable conv2d_54/kernel. This could mean that the variable has been deleted. In TF1, it can also mean the variable is uninitialized. Debug info: container=localhost, status error message=Container localhost does not exist. (Could not find resource: localhost/conv2d_54/kernel)
         [[{{node conv2d_54/Conv2D/ReadVariableOp}}]]

During handling of the above exception, another exception occurred:
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/128950