![](https://img-blog.csdnimg.cn/20200322094546149.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
TensorFlow
TensorFlow
baihaisheng
这个作者很懒,什么都没留下…
展开
-
代码测试gpu可用性
tensorflow import tensorflow as tf print(tf.__version__) print(tf.keras.__version__) if tf.test.is_gpu_available(cuda_only=True): device = "/gpu:0" else: device = "/cpu:0" print(device) Pytorch import torch device = torch.device("cuda:0" if tor原创 2020-06-09 19:46:54 · 345 阅读 · 0 评论 -
Sequential构建模型
Sequential模型原创 2020-03-22 19:05:26 · 291 阅读 · 0 评论 -
TensorFlow快速构建模型
模型的构建: tf.keras.Model 和 tf.keras.layers 模型的损失函数: tf.keras.losses 模型的优化器: tf.keras.optimizer 模型的评估: tf.keras.metrics 案例:识别Mnist手写数字 # 导入tensorflow模块 import tensorflow as tf class Mmodel(tf.ke): (sel...原创 2020-03-22 16:19:53 · 159 阅读 · 0 评论 -
tensorflow基本操作
from tensorflow as tf tf.data原创 2020-03-22 11:25:10 · 226 阅读 · 0 评论