![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tensorflow进阶
迎来进阶了
小蜗笔记
热爱建模和计算机
展开
-
tensorflow--监控运行
import tensorflow as tf @tf.function #启用图必须开启 def my_func(x, y): # A simple hand-rolled layer. return tf.multiply(x, y) # Set up logging. logdir = r"C:\Users\Admin\Documents\vscode\g" writer = tf.summary.create_file_writer(logdir) #日志文件保存 #原创 2021-08-31 22:40:49 · 204 阅读 · 0 评论 -
tensorflow学习参考这里
https://www.bilibili.com/video/BV1Lx411j7ws?p=9点击进入原创 2021-08-28 21:12:07 · 91 阅读 · 0 评论 -
tensorflow笔记--dropout
ncies: tensorflow: 1.1.0 matplotlib numpy """ import tensorflow as tf import numpy as np import matplotlib.pyplot as plt tf.set_random_seed(1) np.random.seed(1) # Hyper parameters N_SAMPLES = 20 N_HIDDEN = 300 LR = 0.01 # training data x = np.linspace(-原创 2021-08-27 16:05:28 · 139 阅读 · 0 评论 -
tensorflow笔记--CNN算法
Dependencies: tensorflow: 1.1.0 matplotlib numpy """ import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import numpy as np import matplotlib.pyplot as plt tf.set_random_seed(1) np.random.seed(1) BATCH_SIZE = 50 LR = 0.001.原创 2021-08-27 16:05:37 · 128 阅读 · 0 评论 -
tensorflow笔记--训练数据集
""" Know more, visit my Python tutorial page: https://morvanzhou.github.io/tutorials/ My Youtube Channel: https://www.youtube.com/user/MorvanZhou More information about Dataset: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/docs_src/prog原创 2021-08-26 18:55:30 · 204 阅读 · 0 评论 -
tensorflow笔记--监控tensorboard
Dependencies: tensorflow: 1.1.0 numpy """ import tensorflow as tf import numpy as np tf.set_random_seed(1) np.random.seed(1) # fake data x = np.linspace(-1, 1, 100)[:, np.newaxis] # shape (100, 1) noise = np.random.normal(0, 0.1, size=x.shape) .原创 2021-08-26 18:53:07 · 90 阅读 · 0 评论 -
tensorflow笔记--优化器
Dependencies: tensorflow: 1.1.0 matplotlib numpy """ import tensorflow as tf import matplotlib.pyplot as plt import numpy as np tf.set_random_seed(1) np.random.seed(1) LR = 0.01 BATCH_SIZE = 32 # fake data x = np.linspace(-1, 1, 100)[:, np.newaxis] .原创 2021-08-26 18:51:46 · 119 阅读 · 0 评论 -
tensoeflow笔记--保存与重载
Dependencies: tensorflow: 1.1.0 matplotlib numpy """ import tensorflow as tf import matplotlib.pyplot as plt import numpy as np tf.set_random_seed(1) np.random.seed(1) # fake data x = np.linspace(-1, 1, 100)[:, np.newaxis] # shape (100, 1) nois.原创 2021-08-26 18:50:48 · 74 阅读 · 0 评论 -
tensorflow笔记--分类
Dependencies: tensorflow: 1.1.0 matplotlib numpy """ import tensorflow as tf import matplotlib.pyplot as plt import numpy as np tf.set_random_seed(1) np.random.seed(1) # fake data n_data = np.ones((100, 2)) x0 = np.random.normal(2*n_data, 1) # clas.原创 2021-08-26 18:49:28 · 95 阅读 · 0 评论 -
tensorflow笔记--回归
Dependencies: tensorflow: 1.1.0 matplotlib numpy """ import tensorflow as tf import matplotlib.pyplot as plt import numpy as np tf.set_random_seed(1) np.random.seed(1) # fake data x = np.linspace(-1, 1, 100)[:, np.newaxis] # shape (100, 1) nois.原创 2021-08-26 18:48:50 · 85 阅读 · 0 评论 -
tensorflow笔记--激活函数
Dependencies: tensorflow: 1.1.0 matplotlib """ import tensorflow as tf import numpy as np import matplotlib.pyplot as plt # fake data x = np.linspace(-5, 5, 200) # x data, shape=(100, 1) # following are popular activation functions y_relu = tf.nn.re.原创 2021-08-26 18:47:39 · 83 阅读 · 0 评论 -
tensorflow笔记--变量
Dependencies: tensorflow: 1.1.0 """ import tensorflow as tf var = tf.Variable(0) # our first variable in the "global_variable" set add_operation = tf.add(var, 1) update_operation = tf.assign(var, add_operation) with tf.Session() as sess: # once d原创 2021-08-26 18:46:23 · 84 阅读 · 0 评论 -
tensorflow笔记--session
session """ Dependencies: tensorflow: 1.1.0 """ import tensorflow as tf m1 = tf.constant([[2, 2]]) m2 = tf.constant([[3], [3]]) dot_operation = tf.matmul(m1, m2) print(dot_operation) # wrong! no result # method1 use session sess = tf.原创 2021-08-26 18:43:12 · 88 阅读 · 0 评论 -
tensorflow笔记--placeholder
Dependencies: tensorflow: 1.1.0 """ import tensorflow as tf x1 = tf.placeholder(dtype=tf.float32, shape=None) y1 = tf.placeholder(dtype=tf.float32, shape=None) z1 = x1 + y1 x2 = tf.placeholder(dtype=tf.float32, shape=[2, 1]) y2 = tf.placeholder(dtype=tf.原创 2021-08-26 18:44:56 · 111 阅读 · 0 评论