zoukankan      html  css  js  c++  java
  • pycharm中出现的错误

    错误1

    在pycharm上安装TensorFlow运行import tensorflow时报错:

    File "<frozen importlib._bootstrap>", line 967, in _find_and_load SystemError: PyEval_EvalFrameEx 。。。。。。。。。。。。。。。
    
    。。。。。。。Check failed: PyBfloat16_Type.tp_base != nullptr

     

    1)解决方法:

        升级numpy后成功

        

      pip install numpy --upgrade


    from numpy import arrayfrom keras.models import Sequentialfrom keras.layers import LSTMfrom keras.layers import Dense# define datasetX = array([[10, 20, 30], [20, 30, 40], [30, 40, 50], [40, 50, 60]])y = array([40, 50, 60, 70])# reshape from [samples, timesteps] into [samples, timesteps, features]X = X.reshape((X.shape[0], X.shape[1], 1))# define modelmodel = Sequential()model.add(LSTM(50, activation='relu', input_shape=(3, 1)))model.add(Dense(1))model.compile(optimizer='adam', loss='mse')# fit modelmodel.fit(X, y, epochs=1000, verbose=0)# demonstrate predictionx_input = array([50, 60, 70])x_input = x_input.reshape((1, 3, 1))yhat = model.predict(x_input, verbose=0)print(yhat)--------------------- 作者:njzhuming 来源:CSDN 原文:https://blog.csdn.net/njzhuming/article/details/84901409 版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    Sprinig.net 双向绑定 Bidirectional data binding and data model management 和 UpdatePanel
    Memcached是什么
    Spring.net 网络示例 codeproject
    jquery.modalbox.show 插件
    UVA 639 Don't Get Rooked
    UVA 539 The Settlers of Catan
    UVA 301 Transportation
    UVA 331 Mapping the Swaps
    UVA 216 Getting in Line
    UVA 10344 23 out of 5
  • 原文地址:https://www.cnblogs.com/51python/p/10470294.html
Copyright © 2011-2022 走看看