首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏木木在学习

    tflearn学习 - 补充1 tflearn文件包解析

    本节对tflearn包里各文件进行分析 根目录: ? 1. _pycache文件夹: python运行时,编译生成的过度文件。 2.datasets文件夹: ? datasets文件夹包含的是tflearn预先准备的几个数据集加载文件。可以方便测试,具体如下 clfar-10 clfar-100:小型图像识别数据库。 imdb:互联网电影资料库。

    55320发布于 2019-04-28
  • 来自专栏木木在学习

    tflearn学习1

    一.安装 pip 下载tensorflow和tflearn 二.泰坦尼克号船员分类 创建py文件(我这里是titanic.py) import numpy as np import tflearn # 下载 Titanic 数据并保存 from tflearn.datasets import titanic titanic.download_dataset('titanic_dataset.csv' ) # 加载 CSV 文件 from tflearn.data_utils import load_csv data, labels = load_csv('titanic_dataset.csv', (shape=[None, 6]) net = tflearn.fully_connected(net, 32) net = tflearn.fully_connected(net, 32) net = tflearn.fully_connected(net, 2, activation='softmax') net = tflearn.regression(net) # 选择 model model

    65820发布于 2019-04-28
  • 来自专栏蒋豆芽的宝箱

    windows下安装tflearn

    1、安装anaconda 2、安装pycharm 3、“启动”--“cmd” 输入pip install tflearn 或 conda install tflearn 4、将python--lib --site-packages下的tflearn相关文件夹复制到 anaconda路径下lib--site-packages 出现的问题:curses is not supported on this

    81510发布于 2020-09-25
  • 来自专栏木木在学习

    tflearn学习2 线性回归

    一:下载支持 需要tensorflow,tflearn。 pip install tensorflow tflearn 二:代码 创建py文件(我这里是XianXingHuiGui.py) """ 线性回归实例 """ from __future__ import 1.7,2.76,2.09,3.19,1.694,1.573,3.366,2.596,2.53,1.221,2.827,3.465,1.65,2.904,2.42,2.94,1.3] # 线性回归模型 input_ = tflearn.input_data (shape=[None]) linear = tflearn.single_unit(input_) regression = tflearn.regression(linear, optimizer ='sgd', loss='mean_square', metric='R2', learning_rate=0.01) m = tflearn.DNN

    65610发布于 2019-04-28
  • 来自专栏深度残差收缩网络

    TFLearn快速搭建深度残差收缩网络

    import tensorflow as tf from tflearn.layers.conv import conv_2d # Data loading from tflearn.datasets tflearn.activation(net, 'relu') net = tflearn.global_avg_pool(net) # Regression net = tflearn.fully_connected @author: me """ import tflearn # Data loading from tflearn.datasets import mnist X, Y, testX, testY = tflearn.residual_block(net, 1, 8, downsample=True) net = tflearn.batch_normalization(net) net = tflearn.activation (net, 'relu') net = tflearn.global_avg_pool(net) # Regression net = tflearn.fully_connected(net, 10,

    79801发布于 2019-12-28
  • 来自专栏杨熹的专栏

    一个 tflearn 情感分析小例子

    的 pad_sequences 将 strings 转化成向量,用 tflearn.embedding 得到 word vector,再传递给 LSTM 得到 feature vector,经过全联接层后 ,再用一个分类器,loss 为 categorical_crossentropy 数据用 tflearn 里面预先处理好的 imdb,IMDB 是一个电影评论的数据库。 from __future__ import division, print_function, absolute_import import tflearn from tflearn.data_utils import to_categorical, pad_sequences from tflearn.datasets import imdb path 是存储的路经,pkl 是 byte stream (net, input_dim=10000, output_dim=128) 模型用的 LSTM,可以保持记忆,dropout 为了减小过拟合 net = tflearn.lstm(net, 128,

    1.2K60发布于 2018-04-03
  • 来自专栏磐创AI技术团队的专栏

    TFLearn:为TensorFlow提供更高级别的API 的深度学习库

    net = tflearn.lstm(net, 64) net = tflearn.dropout(net, 0.5) net = tflearn.fully_connected(net, 5000, TFLearn安装 要安装TFLearn,最简单的方法就是运行。 对于前沿版本(推荐): pip install git + https://github.com/tflearn/tflearn.git 对于最新的稳定版本: pip install tflearn 否则 入门 请参阅TFLearn入门,了解TFLearn基本功能或开始浏览TFLearn教程。 【1】tflearn:https://github.com/tflearn/tflearn

    1K20发布于 2019-09-17
  • 来自专栏目标检测和深度学习

    深度学习TensorFlow的55个经典案例

    TFLearn地址:https://github.com/tflearn/tflearn 示例:https://github.com/tflearn/tflearn/tree/master/examples 预构建的运算和层:http://tflearn.org/doc_index/#api 笔记:https://github.com/tflearn/tflearn/blob/master/tutorials /intro/quickstart.md 基础模型以及数据集 线性回归,使用 TFLearn 实现线性回归 https://github.com/tflearn/tflearn/blob/master/ 使用 TFLearn 实现逻辑运算符 https://github.com/tflearn/tflearn/blob/master/examples/basics/logical.py 权重保持。 Variables,连同 TensorFlow 使用 TFLearn Variables: https://github.com/tflearn/tflearn/blob/master/examples

    1.5K70发布于 2018-04-18
  • 来自专栏人工智能

    TensorFlow实现深度学习算法的教程汇集:代码+笔记

    示例:https://github.com/tflearn/tflearn/tree/master/examples 预构建的运算和层:http://tflearn.org/doc_index/#api 笔记:https://github.com/tflearn/tflearn/blob/master/tutorials/intro/quickstart.md 基础 线性回归,使用 TFLearn 实现线性回归 使用 TFLearn 实现逻辑运算符:https://github.com/tflearn/tflearn/blob/master/examples/basics/logical.py 权重保持。 ,对斯坦福 CS231n spiral 分类难题的 TFLearn 实现:https://github.com/tflearn/tflearn/blob/master/examples/notebooks /spiral.ipynb 可延展的 TensorFlow 层,与 TensorFlow 一起使用 TFLearn 层:https://github.com/tflearn/tflearn/blob/

    1.1K70发布于 2018-01-02
  • 来自专栏IT派

    TensorFlow实现流行机器学习算法的教程汇总(2/3)

    使用教程:TFLearn 快速入门。通过一个具体的机器学习任务学习 TFLearn 基础。开发和训练一个深度神经网络分类器。 TFLearn地址:https://github.com/tflearn/tflearn 示例:https://github.com/tflearn/tflearn/tree/master/examples 预构建的运算和层:http://tflearn.org/doc_index/#api 笔记:https://github.com/tflearn/tflearn/blob/master/tutorials /intro/quickstart.md 基础模型以及数据集 线性回归,使用 TFLearn 实现线性回归 https://github.com/tflearn/tflearn/blob/master/ 使用 TFLearn 实现逻辑运算符 https://github.com/tflearn/tflearn/blob/master/examples/basics/logical.py 权重保持。

    56300发布于 2018-07-30
  • 来自专栏目标检测和深度学习

    TensorFlow实现深度学习算法的教程汇集:代码+笔记

    示例:https://github.com/tflearn/tflearn/tree/master/examples 预构建的运算和层:http://tflearn.org/doc_index/#api 笔记:https://github.com/tflearn/tflearn/blob/master/tutorials/intro/quickstart.md 基础 线性回归,使用 TFLearn 实现线性回归 使用 TFLearn 实现逻辑运算符:https://github.com/tflearn/tflearn/blob/master/examples/basics/logical.py 权重保持。 ,对斯坦福 CS231n spiral 分类难题的 TFLearn 实现:https://github.com/tflearn/tflearn/blob/master/examples/notebooks /spiral.ipynb 可延展的 TensorFlow 层,与 TensorFlow 一起使用 TFLearn 层:https://github.com/tflearn/tflearn/blob/

    1.2K30发布于 2018-07-20
  • 来自专栏目标检测和深度学习

    深度学习TensorFlow的55个经典案例

    TFLearn地址:https://github.com/tflearn/tflearn 示例:https://github.com/tflearn/tflearn/tree/master/examples 预构建的运算和层:http://tflearn.org/doc_index/#api 笔记:https://github.com/tflearn/tflearn/blob/master/tutorials /intro/quickstart.md 基础模型以及数据集 线性回归,使用 TFLearn 实现线性回归 https://github.com/tflearn/tflearn/blob/master/ 使用 TFLearn 实现逻辑运算符 https://github.com/tflearn/tflearn/blob/master/examples/basics/logical.py 权重保持。 Variables,连同 TensorFlow 使用 TFLearn Variables: https://github.com/tflearn/tflearn/blob/master/examples

    1.1K20发布于 2018-07-20
  • 来自专栏IT派

    TensorFlow实现流行机器学习算法的教程汇总(3/3)

    CS231n spiral 分类难题的 TFLearn 实现: https://github.com/tflearn/tflearn/blob/master/examples/notebooks/spiral.ipynb 层,与 TensorFlow 一起使用 TFLearn 层: https://github.com/tflearn/tflearn/blob/master/examples/extending_tensorflow /layers.py 训练器,使用 TFLearn 训练器类训练任何 TensorFlow 图: https://github.com/tflearn/tflearn/blob/master/examples TFLearn summarizers: https://github.com/tflearn/tflearn/blob/master/examples/extending_tensorflow/summaries.py Variables,连同 TensorFlow 使用 TFLearn Variables: https://github.com/tflearn/tflearn/blob/master/examples

    46700发布于 2018-07-30
  • 来自专栏机器学习算法与Python学习

    干货 | TensorFlow的55个经典案例

    TFLearn地址:https://github.com/tflearn/tflearn 示例:https://github.com/tflearn/tflearn/tree/master/examples 预构建的运算和层:http://tflearn.org/doc_index/#api 笔记:https://github.com/tflearn/tflearn/blob/master/tutorials /intro/quickstart.md 基础模型以及数据集 线性回归,使用 TFLearn 实现线性回归 https://github.com/tflearn/tflearn/blob/master/ 使用 TFLearn 实现逻辑运算符 https://github.com/tflearn/tflearn/blob/master/examples/basics/logical.py 权重保持。 Variables,连同 TensorFlow 使用 TFLearn Variables: https://github.com/tflearn/tflearn/blob/master/examples

    94090发布于 2018-04-08
  • 来自专栏深度残差收缩网络

    深度残差收缩网络(六)代码实现

    本文采用TensorFlow 1.0和TFLearn 0.3.2,编写了图像分类的程序,采用的图像数据为CIFAR-10。CIFAR-10是一个非常常用的图像数据集,包含10个类别的图像。 可以在这个网址找到具体介绍:https://www.cs.toronto.edu/~kriz/cifar.html 2.png 参照ResNet代码(https://github.com/tflearn /tflearn/blob/master/examples/images/residual_network_cifar10.py),所编写的深度残差收缩网络的代码如下: #! (scales) scales = tflearn.activation(scales, 'relu') scales = tflearn.fully_connected (net) net = tflearn.activation(net, 'relu') net = tflearn.global_avg_pool(net) # Regression net = tflearn.fully_connected

    93500发布于 2019-12-24
  • 来自专栏python前行者

    [940]TensorFlow练习4: CNN, Convolutional Neural Networks

    下面使用tflearn重写上面代码,tflearn是TensorFlow的高级封装,类似Keras。 tflearn提供了更简单、直观的接口。 和scikit-learn差不多,代码如下: # -*- coding:utf-8 -*- import tflearn from tflearn.layers.conv import conv_2d, max_pool_2d from tflearn.layers.core import input_data, dropout, fully_connected from tflearn.layers.estimator import regression train_x, train_y, test_x, test_y = tflearn.datasets.mnist.load_data( data_dir

    41320发布于 2021-02-04
  • 来自专栏杨熹的专栏

    用 TensorFlow 创建自己的 Speech Recognizer

    导入库 需要用到 tflearn,这是建立在 TensorFlow 上的高级的库,可以很方便地建立网络。 还会用到辅助的类 speech_data,用来下载数据并且做一些预处理。 from __future__ import division, print_function, absolute_import import tflearn import speech_data import # Network building net = tflearn.input_data([None, width, height]) net = tflearn.lstm(net, 128, dropout =0.8) net = tflearn.fully_connected(net, classes, activation='softmax') net = tflearn.regression(net, 训练模型并预测 然后用 tflearn.DNN 函数来初始化一下模型,接下来就可以训练并预测,最后再保存训练好的模型。

    84550发布于 2018-04-03
  • 来自专栏深度学习笔记

    注意力机制+软阈值化=深度残差收缩网络

    6.Keras和TFLearn程序简介 本程序以图像分类为例,构建了小型的深度残差收缩网络,超参数也未进行优化。为追求高准确率的话,可以适当增加深度,增加训练迭代次数,以及适当调整超参数。 import numpy as np import tensorflow as tf from tflearn.layers.conv import conv_2d # Data loading from tflearn.datasets import cifar10 (X, Y), (testX, testY) = cifar10.load_data() # Add noise X = (scales) scales = tflearn.activation(scales, 'relu') scales = tflearn.fully_connected (net) net = tflearn.activation(net, 'relu') net = tflearn.global_avg_pool(net) # Regression net = tflearn.fully_connected

    92300发布于 2020-03-18
  • 来自专栏深度爱学习

    深度残差收缩网络:从删除冗余特征的灵活度进行探讨

    TFLearn示例代码 #! import numpy as np import tensorflow as tf from tflearn.layers.conv import conv_2d # Data loading from tflearn.datasets import cifar10 (X, Y), (testX, testY) = cifar10.load_data() # Add noise X = (scales) scales = tflearn.activation(scales, 'relu') scales = tflearn.fully_connected (net) net = tflearn.activation(net, 'relu') net = tflearn.global_avg_pool(net) # Regression net = tflearn.fully_connected

    90000发布于 2020-03-29
  • 来自专栏论文笔记

    深度残差收缩网络:一种新的深度注意力机制算法(附代码)

    TFLearn程序 #! import numpy as np import tensorflow as tf from tflearn.layers.conv import conv_2d # Data loading from tflearn.datasets import cifar10 (X, Y), (testX, testY) = cifar10.load_data() # Add noise X = (scales) scales = tflearn.activation(scales, 'relu') scales = tflearn.fully_connected (net) net = tflearn.activation(net, 'relu') net = tflearn.global_avg_pool(net) # Regression net = tflearn.fully_connected

    7.3K00发布于 2020-03-21
领券