煤油模型载荷重量()错误:值错误:无效的高库版本绑定(无效的高库版本绑定)

2024-04-20 15:32:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用Docker from Gadgetron来实现一个带有Keras的小工具。作为后端。这是Dockerfilepip list的结果是

Package              Version    
-------------------- -----------
absl-py              0.7.1      
astor                0.8.0      
certifi              2019.6.16  
chardet              3.0.4      
cycler               0.10.0     
Cython               0.26.1     
decorator            4.4.0      
dicom                0.9.9.post1
dicom-numpy          0.1.6      
engineering-notation 0.6.0      
gast                 0.2.2      
google-pasta         0.1.7      
grpcio               1.21.1     
h5py                 2.9.0      
idna                 2.8        
imageio              2.5.0      
ismrmrd              1.6.1      
ismrmrd-python-tools 0.3        
joblib               0.13.2     
Keras                2.2.4      
Keras-Applications   1.0.8      
Keras-Preprocessing  1.1.0      
kiwisolver           1.1.0      
lxml                 4.2.1      
Markdown             3.1.1      
matplotlib           3.1.0      
networkx             2.3        
numpy                1.16.4     
opencv-python        4.1.0.25   
Pillow               6.0.0      
pip                  19.2.3     
protobuf             3.8.0      
psutil               5.4.2      
pydicom              1.2.2      
pygobject            3.26.1     
pynrrd               0.4.0      
pyparsing            2.4.0      
PyQt5                5.12.2     
PyQt5-sip            4.19.17    
python-apt           1.6.4      
python-dateutil      2.8.0      
pytz                 2019.2     
PyWavelets           1.0.3      
PyXB                 1.2.6      
PyYAML               5.1.1      
pyzmq                18.0.2     
requests             2.22.0     
scikit-image         0.15.0     
scikit-learn         0.21.2     
scipy                1.3.0      
setuptools           41.0.1     
six                  1.12.0     
sklearn              0.0        
tensorboard          1.14.0     
tensorboardX         1.8        
tensorflow           1.14.0     
tensorflow-estimator 1.14.0     
tensorflow-gpu       1.14.0     
termcolor            1.1.0      
Theano               1.0.4      
tk-tools             0.11.0     
torch                1.1.0      
torchfile            0.1.0      
torchvision          0.3.0      
tornado              6.0.3      
urllib3              1.25.3     
visdom               0.1.8.8    
websocket-client     0.56.0     
Werkzeug             0.15.4     
wheel                0.33.4     
wrapt                1.11.2     

Mycode是这样的:

^{pr2}$

加载砝码时,出现错误:

^{3}$

然而,当在python模型中打开时,

>>> from keras.models import model_from_json
>>> with open('/opt/data/model.json', 'r') as f:
...     model = model_from_json(f.read())
...
>>> model.load_weights('/opt/data/weight.h5')
>>> 

我曾试图用pip重新安装h5py,但它不起作用。在

问题是它直接在python交互终端中工作,但在Gadget脚本中不工作。在


Tags: pipfromnumpyjsondatamodeltensorflowscikit