资源简介
google于2016年发表的论文"Wide & Deep Learning for Recommender Systems"里面的代码;
全套工程文件+数据集+调试过程;
经过tf版本升级之后,通过调试,没有问题;
其他小问题可以参考我写的“调试过程”
代码片段和文件信息
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License Version 2.0 (the “License“);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing software
# distributed under the License is distributed on an “AS IS“ BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
“““Download and clean the Census Income Dataset.“““
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
import sys
from six.moves import urllib
import tensorflow as tf
DATA_URL = ‘https://archive.ics.uci.edu/ml/machine-learning-databases/adult‘
TRAINING_FILE = ‘adult.data‘
TRAINING_URL = ‘%s/%s‘ % (DATA_URL TRAINING_FILE)
EVAL_FILE = ‘adult.test‘
EVAL_URL = ‘%s/%s‘ % (DATA_URL EVAL_FILE)
parser = argparse.ArgumentParser()
parser.add_argument(
‘--data_dir‘ type=str default=‘./‘
help=‘Directory to download census data‘)
def _download_and_clean_file(filename url):
“““Downloads data from url and makes changes to match the CSV format.“““
temp_file _ = urllib.request.urlretrieve(url)
with tf.gfile.Open(temp_file ‘r‘) as temp_eval_file:
with tf.gfile.Open(filename ‘w‘) as eval_file:
for line in temp_eval_file:
line = line.strip()
line = line.replace(‘ ‘ ‘‘)
if not line or ‘‘ not in line:
continue
if line[-1] == ‘.‘:
line = line[:-1]
line += ‘\n‘
eval_file.write(line)
tf.gfile.Remove(temp_file)
def main(_):
if not tf.gfile.Exists(FLAGS.data_dir):
tf.gfile.MkDir(FLAGS.data_dir)
training_file_path = os.path.join(FLAGS.data_dir TRAINING_FILE)
_download_and_clean_file(training_file_path TRAINING_URL)
eval_file_path = os.path.join(FLAGS.data_dir EVAL_FILE)
_download_and_clean_file(eval_file_path EVAL_URL)
if __name__ == ‘__main__‘:
FLAGS unparsed = parser.parse_known_args()
tf.app.run(argv=[sys.argv[0]] + unparsed)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 228 2018-08-10 14:49 wide_deep\wide_deep\.idea\inspectionProfiles\profiles_settings.xm
文件 213 2018-08-10 14:49 wide_deep\wide_deep\.idea\misc.xm
文件 270 2018-08-10 14:49 wide_deep\wide_deep\.idea\modules.xm
文件 459 2018-08-10 14:49 wide_deep\wide_deep\.idea\wide_deep.iml
文件 24867 2018-08-10 17:45 wide_deep\wide_deep\.idea\workspace.xm
文件 3518450 2018-08-10 15:01 wide_deep\wide_deep\data\adult.data
文件 1758916 2018-08-10 15:02 wide_deep\wide_deep\data\adult.test
文件 2412 2018-08-10 14:57 wide_deep\wide_deep\data_download.py
文件 172 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\checkpoint
文件 1069939 2018-08-10 16:45 wide_deep\wide_deep\model\wide_component\eval\events.out.tfevents.1533890712.20160331-6353
文件 1069945 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\eval\events.out.tfevents.1533894224.20160331-6353
文件 1857809 2018-08-10 16:45 wide_deep\wide_deep\model\wide_component\events.out.tfevents.1533890706.20160331-6353
文件 1857812 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\events.out.tfevents.1533894219.20160331-6353
文件 1068593 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\graph.pbtxt
文件 8 2018-08-10 16:45 wide_deep\wide_deep\model\wide_component\model.ckpt-0.data-00000-of-00002
文件 36600 2018-08-10 16:45 wide_deep\wide_deep\model\wide_component\model.ckpt-0.data-00001-of-00002
文件 1265 2018-08-10 16:45 wide_deep\wide_deep\model\wide_component\model.ckpt-0.index
文件 513281 2018-08-10 16:45 wide_deep\wide_deep\model\wide_component\model.ckpt-0.me
文件 8 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\model.ckpt-128.data-00000-of-00002
文件 36600 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\model.ckpt-128.data-00001-of-00002
文件 1265 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\model.ckpt-128.index
文件 513281 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\model.ckpt-128.me
文件 8 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\model.ckpt-64.data-00000-of-00002
文件 36600 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\model.ckpt-64.data-00001-of-00002
文件 1265 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\model.ckpt-64.index
文件 513281 2018-08-10 17:43 wide_deep\wide_deep\model\wide_component\model.ckpt-64.me
文件 277 2018-08-11 10:20 wide_deep\wide_deep\model\wide_deep\checkpoint
文件 1229922 2018-08-10 16:36 wide_deep\wide_deep\model\wide_deep\eval\events.out.tfevents.1533890175.20160331-6353
文件 1229922 2018-08-10 17:06 wide_deep\wide_deep\model\wide_deep\eval\events.out.tfevents.1533891942.20160331-6353
文件 1229925 2018-08-10 17:11 wide_deep\wide_deep\model\wide_deep\eval\events.out.tfevents.1533892254.20160331-6353
............此处省略40个文件信息
- 上一篇:基于微信小程序外卖点餐系统 开题报告
- 下一篇:加密狗破解工具 et199专用
相关资源
- 淘宝注册软件|谷跑淘宝注册软件v1.
- 最简单的基于FFmpeg的推流器以推送R
- rabbitmq-server-3.7.3
- 史上最全的seo工具seo外链包博客论坛
- 国务院关于积极推进“互联网+”行
- googlemappoi内容解析
- 基于item-user混合协同过滤的推送系统
- 凌力尔特推出80V同步降压-升压型控制
- pb 推荐学习资料全集
- 论文研究 - NASA的EM驱动器受到时空量
- 得实Dascom DS-1700平推票据打印机驱动
- 得实Dascom AR-520平推针式打印机驱动程
- 实达STAR AR970平推票据打印机驱动程序
- 构建安全防御体系 推进救援队伍建设
- csv 转换为google earth的轨迹kml
- 论文研究 - 使用基于GIS的模糊推理评
- 大豆推广品种耐低钾特性鉴定与种质
- 长庆油田以信息化建设推进数字油田
- 论文研究 - 序言:父母提前年龄的少
- 亲/疏水表面上液滴接触角滞后的研究
- 论文研究 - 基于协同过滤和人工神经
- SVPWM的原理及法则推导和控制算法详解
- 11个程序员必备神器软件推荐附地址
- 推荐系统 [奥詹尼士,奥赞克,奥弗里
- 人工智能和遗传算法的结合推荐必读
- 流动人口公共文化服务视阈下的图书
- Google Chrome 49.0.2623.110 便携版(免安装
- α-P烯热异构化反应速率常数评价
- AppCode,新书推荐,Beginning iOS 11 Prog
- 多分类Logistic回归及其统计推断
评论
共有 条评论