人工智能 - 自编码器(AutoEncoder)

本文介绍了如何使用TensorFlow构建自编码器,包括工程配置、数据预处理、自编码器模型的搭建以及训练过程。通过添加高斯噪声的自动编码器(AdditiveGaussianNoiseAutoencoder)对MNIST数据集进行处理,展示了原始图像和自编码器重构后的效果。
摘要由CSDN通过智能技术生成

 欢迎Follow我的GitHub

本文地址:http://blog.csdn.net/caroline_wendy/article/details/77639573

自编码器,使用稀疏的高阶特征重新组合,来重构自己,输入与输出一致。

TensorFlow的框架,参考

源码,同时,复制autoencoder_models的模型文件。

本文源码的GitHub地址

AutoEncoder


工程配置

下载Python的依赖库:scikit-learn==0.19.0scipy==0.19.1sklearn==0.0

scipy

如果安装scipy出错,则把scipy==0.19.1写入requestments.txt,再安装,错误如下:

THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    scipy from http://mirrors.aliyun.com/pypi/packages/63/68/c5098f3b6034e69d187e3f2e989f462143d9f8b524f5a4f9e13c4a6f5f47/scipy-0.19.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=72415e8da753eea97eb9820602931cb5:
        Expected md5 72415e8da753eea97eb9820602931cb5
             Got        073584eb2c597bbfb82a5865b7055787

或者,直接编写requestments.txt,全部安装

pip install -r requirements.txt

matplotlib

安装matplotlib

pip install matplotlib -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

如果安装matplotlib报错,如下:

RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.

则执行Shell命令

cd ~/.matplotlib
touch matplotlibrc

导入matplotlib

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt

opencv

  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

CarolineSpike

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值