python - 再现全连接顺序层

标签 python tensorflow keras customization

我想更好地了解如何制作自定义 keras 层,但我似乎无法在网上找到以下内容...我正在学习如何使用自定义来重现基本(前馈)keras 层层结构。

我在哪里可以在线找到此信息或者如何操作?

我问,因为我遇到的所有在线资源都只做其他更简单的层作为示例。

最佳答案

您需要对 tf.keras.layers.Layer 类进行子类化。以 SimpleDense 层为例 here .

关于python - 再现全连接顺序层,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62318238/

相关文章:

python - 如何在 Python 中从一个字符串中查找多个子字符串

python - Tensorflow 对象检测 API : how to create tfrecords with images not containing any labels (hard negatives)?

python - 如何解释 model.evaluate() 返回的损失?

python - 在 Keras 中保存最佳权重和模型

python - Python中的离线反向地理编码

python - 如何写入我使用 filedialog.asksaveasfile 选择的文件?

python - 迭代 numpy 数组的函数

python - tensorflow 内存 MNIST 教程

python - 分别在 RGB channel 上进行 Tensorflow 2D 卷积?

python - 如何在测试集中找到错误的预测案例(使用 Keras 的 CNN)