python - 如何将 Keras 张量转换为 numpy 数组
问题描述
我正在努力将一个简单的 Keras 张量转换为一个 Numpy 数组。这是我要执行的代码:
input = tf.keras.Input(shape=(100, 1), name='input')
inputs = np.array(input)
错误:Cannot convert a symbolic Keras input/output to a numpy array.
解决方案
推荐阅读
- javascript - 从一个字符串中删除另一个字符串中包含的字符
- python - 在 spyder 中启动内核 ipython 控制台时出错
- vue.js - 带有mapGetter的VueJs元素选择列表不起作用
- ios - 如何使用 API 调用实现 XCUITest
- css - 如何在使用面板中的按钮时将切换图标保持在最右侧,PrimeNg
- c++ - 如何在静脉 omnet++ 中实现 V2I 通信?
- machine-learning - ValueError:检查输入时出错:预期 embedding_1_input 的形状为 (150,),但数组的形状为 (74,)
- javascript - 如何从服务器中删除所有角色而不会出错?
- javascript - 为什么我首先在控制台中未定义然后打印我想要的数字?
- python-3.x - 如何分解(取消嵌套)嵌套数据框?