tensorflow学习——tf.get_collection(), tf.identity()

0、将神经网络生成pb文件1、tf.get_collection获取训练变量# train_vars=tf.trainable_variables() # g_vars=[var for var in train_vars if var.name.startswith('generat...

2017-08-28 16:05:56

阅读数:831

评论数:0

tensorflow学习——tf.layers.batch_normalization/tf.nn.batch_normalization/tf.contrib.layers.batch_norm

图片归一化方法:import tensorflow as tf a=tf.constant([1.,2.,3.,4.,7.,5.,8.,4.,6.],shape=(1,3,3,3)) a_mean, a_var = tf.nn.moments(a, axes=[1,2],keep_dims=Tr...

2017-08-23 11:14:44

阅读数:6437

评论数:0

tensorflow学习——DCGAN手写体生成

import numpy as np import tensorflow as tf import pickle import matplotlib.pyplot as pltprint("TensorFlow Version: {}".format(tf.__version_...

2017-08-14 20:56:16

阅读数:698

评论数:0

tensorflow学习——GAN手写体生成

import tensorflow as tf import numpy as np import pickle import matplotlib.pyplot as plt from tensorflow.examples.tutorials.mnist import input_data m...

2017-08-14 20:55:17

阅读数:1056

评论数:0

tensorflow——SVM实现

1、SVM实现#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Aug 6 18:46:23 2017@author: dell """import nu...

2017-08-09 18:12:33

阅读数:577

评论数:0

tensorflow——SVM实现

import numpy as np import tensorflow as tf import matplotlib.pyplot as plt # 生成数据集 def gen_two_clusters(size=100, n_dim=2, center=0, dis=2, scale=1, ...

2017-08-07 15:42:37

阅读数:6524

评论数:0

tensorflow——tf.one_hot以及tf.sparse_to_dense函数

1、tf.one_hot函数import numpy as np import tensorflow as tfSIZE=6 CLASS=10 label1=np.random.randint(0,10,size=SIZE) b = tf.one_hot(label1,CLASS,1,0) wit...

2017-08-04 20:47:31

阅读数:5447

评论数:1

tensorflow学习——tfreader格式,队列读取数据tf.train.shuffle_batch()

1、说明 tf.train.shuffle_batch() 这个函数的功能是:Creates batches by randomly shuffling tensors. 但需要注意的是它是一种图运算,要跑在sess.run()里 This function adds the follow...

2017-08-02 13:01:50

阅读数:8969

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭