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 版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    递归与分治4
    递归与分治3
    递归与分治2
    递归与分治1
    枚举与递推3
    枚举与递推2
    求编译器中数的最值(c++)
    移动小球链表实现
    阶乘的精确值
    while((c = getchar()) != EOF)(键盘输入问题)
  • 原文地址:https://www.cnblogs.com/51python/p/10470294.html
Copyright © 2011-2022 走看看