Ai
1 Star 0 Fork 0

算法与编程之美/ctrNet-tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ctrNet.py 772 Bytes
一键复制 编辑 原始数据 按行查看 历史
guoday 提交于 2019-02-18 00:50 +08:00 . update xdeepfm
from src import misc_utils as utils
from models import fm
from models import ffm
from models import nffm
from models import xdeepfm
import tensorflow as tf
from imp import reload
def build_model(hparams):
tf.reset_default_graph()
if hparams.model=='fm':
model=fm.Model(hparams)
elif hparams.model=='ffm':
model=ffm.Model(hparams)
elif hparams.model=='nffm':
model=nffm.Model(hparams)
elif hparams.model=='xdeepfm':
model=xdeepfm.Model(hparams)
config_proto = tf.ConfigProto(log_device_placement=0,allow_soft_placement=0)
config_proto.gpu_options.allow_growth = True
sess=tf.Session(config=config_proto)
sess.run(tf.global_variables_initializer())
model.set_Session(sess)
return model
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/algo_coding/ctrNet-tool.git
git@gitee.com:algo_coding/ctrNet-tool.git
algo_coding
ctrNet-tool
ctrNet-tool
master

搜索帮助