Live2D

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

posted @   -涂涂-  阅读(1187)  评论(0编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
点击右上角即可分享
微信分享提示