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 · 220 阅读 · 0 评论 -
tensorflow学习参考这里
https://www.bilibili.com/video/BV1Lx411j7ws?p=9点击进入原创 2021-08-28 21:12:07 · 111 阅读 · 0 评论 -
tensorflow笔记--dropout
ncies:tensorflow: 1.1.0matplotlibnumpy"""import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plttf.set_random_seed(1)np.random.seed(1)# Hyper parametersN_SAMPLES = 20N_HIDDEN = 300LR = 0.01# training datax = np.linspace(-原创 2021-08-27 16:05:28 · 154 阅读 · 0 评论 -
tensorflow笔记--CNN算法
Dependencies:tensorflow: 1.1.0matplotlibnumpy"""import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_dataimport numpy as npimport matplotlib.pyplot as plttf.set_random_seed(1)np.random.seed(1)BATCH_SIZE = 50LR = 0.001.原创 2021-08-27 16:05:37 · 133 阅读 · 0 评论 -
tensorflow笔记--训练数据集
"""Know more, visit my Python tutorial page: https://morvanzhou.github.io/tutorials/My Youtube Channel: https://www.youtube.com/user/MorvanZhouMore information about Dataset: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/docs_src/prog原创 2021-08-26 18:55:30 · 220 阅读 · 0 评论 -
tensorflow笔记--监控tensorboard
Dependencies:tensorflow: 1.1.0numpy"""import tensorflow as tfimport numpy as nptf.set_random_seed(1)np.random.seed(1)# fake datax = 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 · 96 阅读 · 0 评论 -
tensorflow笔记--优化器
Dependencies:tensorflow: 1.1.0matplotlibnumpy"""import tensorflow as tfimport matplotlib.pyplot as pltimport numpy as nptf.set_random_seed(1)np.random.seed(1)LR = 0.01BATCH_SIZE = 32# fake datax = np.linspace(-1, 1, 100)[:, np.newaxis] .原创 2021-08-26 18:51:46 · 125 阅读 · 0 评论 -
tensoeflow笔记--保存与重载
Dependencies:tensorflow: 1.1.0matplotlibnumpy"""import tensorflow as tfimport matplotlib.pyplot as pltimport numpy as nptf.set_random_seed(1)np.random.seed(1)# fake datax = np.linspace(-1, 1, 100)[:, np.newaxis] # shape (100, 1)nois.原创 2021-08-26 18:50:48 · 90 阅读 · 0 评论 -
tensorflow笔记--分类
Dependencies:tensorflow: 1.1.0matplotlibnumpy"""import tensorflow as tfimport matplotlib.pyplot as pltimport numpy as nptf.set_random_seed(1)np.random.seed(1)# fake datan_data = np.ones((100, 2))x0 = np.random.normal(2*n_data, 1) # clas.原创 2021-08-26 18:49:28 · 101 阅读 · 0 评论 -
tensorflow笔记--回归
Dependencies:tensorflow: 1.1.0matplotlibnumpy"""import tensorflow as tfimport matplotlib.pyplot as pltimport numpy as nptf.set_random_seed(1)np.random.seed(1)# fake datax = np.linspace(-1, 1, 100)[:, np.newaxis] # shape (100, 1)nois.原创 2021-08-26 18:48:50 · 101 阅读 · 0 评论 -
tensorflow笔记--激活函数
Dependencies:tensorflow: 1.1.0matplotlib"""import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plt# fake datax = np.linspace(-5, 5, 200) # x data, shape=(100, 1)# following are popular activation functionsy_relu = tf.nn.re.原创 2021-08-26 18:47:39 · 103 阅读 · 0 评论 -
tensorflow笔记--变量
Dependencies:tensorflow: 1.1.0"""import tensorflow as tfvar = tf.Variable(0) # our first variable in the "global_variable" setadd_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 · 102 阅读 · 0 评论 -
tensorflow笔记--session
session"""Dependencies:tensorflow: 1.1.0"""import tensorflow as tfm1 = tf.constant([[2, 2]])m2 = tf.constant([[3], [3]])dot_operation = tf.matmul(m1, m2)print(dot_operation) # wrong! no result# method1 use sessionsess = tf.原创 2021-08-26 18:43:12 · 105 阅读 · 0 评论 -
tensorflow笔记--placeholder
Dependencies:tensorflow: 1.1.0"""import tensorflow as tfx1 = tf.placeholder(dtype=tf.float32, shape=None)y1 = tf.placeholder(dtype=tf.float32, shape=None)z1 = x1 + y1x2 = tf.placeholder(dtype=tf.float32, shape=[2, 1])y2 = tf.placeholder(dtype=tf.原创 2021-08-26 18:44:56 · 129 阅读 · 0 评论