![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tensorflow
zoot
2017年我开始了csdn,我从互联而来,为互联而去.修行靠个人,记录.
展开
-
tf.nn.ctc
batch_size=4, max_time=5, and labels_length=[5,4,3,2]. import tensorflow as tf labels = tf.Variable([[4, 3, 1, 2, 5], [2, 3, 4, 1, 0], [1, 2, 3, 0, 0], [5, 4, 0, 0, 0]], tf.int32) with tf..原创 2021-05-27 13:43:33 · 94 阅读 · 0 评论 -
tensorflow-10
tf.keras.backend.image_data_format()原创 2021-02-19 18:11:33 · 69 阅读 · 0 评论 -
tensorflow-7
错误记录 2020-05-14 10:11:00.935025: E tensorflow/stream_executor/cuda/cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR 2020-05-14 10:11:00.935050: E tensorflow/stream_executor/cuda/cuda_dnn.cc:352] could not destroy cudnn handle: CU原创 2020-05-14 10:51:03 · 213 阅读 · 0 评论 -
tensorflow-8
TensorFlow数据读取方法 文件准备 $ echo -e "Alpha1,A1\nAlpha2,A2\nAlpha3,A3" > A.csv $ echo -e "Bee1,B1\nBee2,B2\nBee3,B3" > B.csv $ echo -e "Sea1,C1\nSea2,C2\nSea3,C3" > C.csv $ cat A.csv Alpha1,A1 A...转载 2019-07-14 19:52:08 · 58 阅读 · 0 评论 -
tensorflow-7
TensorFlow的Queue # -*-coding:utf-8 -*- import tensorflow as tf import tensorflow as tf import numpy as np def generate_data(): num = 25 label = np.asarray(range(0, num)) images = np.rand...原创 2019-06-24 18:39:30 · 69 阅读 · 0 评论 -
tensorflow-6
tf.train.ExponentialMovingAverage使用举例 import tensorflow as tf; import numpy as np; import matplotlib.pyplot as plt; v1 = tf.Variable(0, dtype=tf.float32) step = tf.Variable(tf.constant(0)) ...转载 2019-06-24 11:31:38 · 69 阅读 · 0 评论 -
tensorflow-5
tensorflow ctc示例 #-*-coding:utf8-*- ''' tensorflow1.4 ''' import tensorflow as tf import numpy as np import pdb import random def create_sparse(batch_size, dtype=np.int32): ''' 创建稀疏张量,ctc_los...原创 2019-03-15 16:09:27 · 194 阅读 · 0 评论 -
tensorflow-4
UCF-101 3d卷积输入样例 create_tfrecord_dataset.py #!/usr/bin/python # -*- coding: utf-8 -*- import cv2; import numpy as np; from numpy.random import uniform; from random import shuffle; import os; import...翻译 2019-03-15 15:37:32 · 153 阅读 · 2 评论 -
tensorflow-3
tensorflow连接时序分类图片 main.py #-*-coding:utf-8-*- from keras.layers import TimeDistributed, Activation, Dense, Input, Bidirectional, LSTM, Masking, GaussianNoise from keras.optimizers import Adam from CT...原创 2019-03-08 16:42:54 · 1507 阅读 · 0 评论 -
tensorflow-2
keras分别设置cpu和gpu训练,经过几番测试,控制效果明显 import tensorflow as tf from keras import backend as K num_cores = 8 GPU = False CPU = True if GPU: num_GPU = 1 num_CPU = 1 if CPU: num_CPU = 1 num_...原创 2019-02-20 15:03:17 · 104 阅读 · 0 评论 -
tensorflow-1
分布式测试平台搭建 环境:内网两台服务器地址10.0.1.110和10.0.1.111,显卡为nvidia,容量12G.其中地址10.0.1.110的服务器上文件为 t1.py,c1.py,地址10.0.1.111的服务器上文件为c2.py 各个文件内容 地址10.0.1.110服务器上的文件 t1.py如下: import tensorflow as tf import numpy as n...原创 2019-02-01 09:40:07 · 103 阅读 · 0 评论 -
tensorflow-0
mnist基本程序 import warnings warnings.filterwarnings('ignore') import tensorflow as tf config = tf.ConfigProto() config.gpu_options.allow_growth = True sess = tf.Session(config=config) from tensorflow....原创 2019-01-18 11:05:53 · 115 阅读 · 0 评论