![](https://img-blog.csdnimg.cn/20190918140053667.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Tensorflow2.0 学习专栏
文章平均质量分 64
用于TF2+version版本的学习
等待戈多。
这个作者很懒,什么都没留下…
展开
-
Tensorflow2模型的保存与加载
模型的保存与加载保存和加载整个模型模型的保存:模型的加载通过本篇blog,你将会学到将所有内容以 TensorFlow SavedModel 格式(或较早的 Keras H5 格式)保存到单个归档。这是标准做法。仅保存架构/配置,通常保存为 JSON 文件。仅保存权重值。通常在训练模型时使用。参考链接Tensorflow官方保存和加载整个模型模型的保存:API:model.save() 或 tf.keras.models.save_model()参考此API,你将保存完整的模型架构原创 2021-02-21 10:31:01 · 1086 阅读 · 1 评论 -
Tensorflow2自定义Layers之__init__,build和call详解
Tensorflow2自定义Layers之__init__,build和call详解闲言碎语:--init--,build和call总结参考官方链接:https://tensorflow.google.cn/tutorials/customization/custom_layers闲言碎语:如果想要自定义自己的Layer,那么使用tf.keras.Layer 来创建自己的类是必不可少的。但是笔者最近在搞自己的毕设时,遇到了自定义层和tf.function的Error:ValueError: tf.原创 2021-02-19 00:39:11 · 2643 阅读 · 3 评论 -
Failed to create cuSolverDN instance.问题的解决 Tensorflow
cusolverDnCreate(&cusolver_dn_handle) == CUSOLVER_STATUS_SUCCESS Failed to create cuSolverDN instance.经过查询发现问题反馈普遍是Gpu 跑满,在TensorFlow2上的解决方法physical_devices = tf.config.list_physical_devices('GPU')try: tf.config.experimental.set_memory_growth(phys原创 2021-02-18 00:33:50 · 1551 阅读 · 0 评论 -
在安卓设备上实现手写数字识别(二:模型训练及TF.lite的转换)Tensorflow Lite + Android)
在安卓设备上实现手写数字识别(二:Tensorflow代码实现)Tensorflow Lite + Android数据集参考代码模型架构参考代码Define the model architecture模型转换为TF.lite格式参考代码评估量化前后的两种TFlite模型参考代码数据集数据集选用 Mnist数据集,该数据集有60000张训练图和10000张测试图,每张图片都是 28x28的灰度图,灰度图数值为0-255,每张图片分别是手写数字从0到9。在处理数据集时,对数据集进行规范化处理,使其范围原创 2021-01-22 14:49:36 · 1268 阅读 · 0 评论 -
在安卓设备上实现手写数字识别(一:引言)Tensorflow Lite + Android
在安卓设备上实现手写数字识别(一:引言)实现最终效果你将会学到什么?你需要用到什么?发现一个好东西 Google 的Codelab CodeLab这个系列的blog将来自于Khanh LeViet的Codelab的教程基于安卓端的手写数字的识别,非常感谢这位老哥。实现最终效果可以在Android设备上手写一个数字,然后预测出手写数字的结果及其置信度。你将会学到什么? 如何用Tensorflow实现手写数字识别 如何将TensorFlow的model转换到TensorFlow lite原创 2021-01-22 00:48:03 · 1064 阅读 · 3 评论 -
Readers are not supported when eager execution is enabled.Tensorflow2.0出现的问题的解决
Readers are not supported when eager execution is enabled. Instead, please use tf.data to get data into your model.解决方法在笔者将1.0代码转换成2.0代码时出现该问题.问题记录:Readers are not supported when eager execution is enabled. Instead, please use tf.data to get data into原创 2020-07-02 21:28:45 · 4252 阅读 · 0 评论