![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
文章平均质量分 54
Sai-qgj
对编程感兴趣的人
展开
-
tensorflow基础enable_eager_execution和disable_eager_execution
tensorflow基础enable_eager_execution和disable_eager_executiontensorflow自从2.0后默认就开启可enable_eager_execution,开启后不会再向之前的tensorflow版本一样进行声明式编程,在这种模式下,我们就和平时普通的命令式编程一样,并且可以即时输出结果,不需要再进行调用Session,然后通过Session.run()进行结果的获取。这也是tensorflow相比较于卡面版本的改进,也是借鉴了torch的优点,毕竟命令原创 2021-07-12 22:16:54 · 4239 阅读 · 0 评论 -
tensorflow中的disable_eager_execution和enable_eager_execution问题
tensorflow中的disable_eager_execution和enable_eager_execution问题在tensorflow中,我们经常遇到一些错误,例如下面的提示An op outside of the function building code is being passeda "Graph" tensor. It is possible to have Graph tensorsleak out of the function building context by inc原创 2021-07-12 21:49:42 · 5172 阅读 · 0 评论 -
Transformer代码解读(机器翻译)
Transformer代码解读(机器翻译)数据处理(涉及文件prepro.py)数据加载(涉及文件data_load.py)模型构建(涉及文件module.py和model.py)这里给出代码的github地址(https://github.com/Kyubyong/transformer)数据处理(涉及文件prepro.py)代码中给出的数据是使用的是IWSLT2016德语和英语的数据集,如下图所示,(对于linux的用户可以执行shell脚本获取到数据集),对于windows的用户数据下载地址为(原创 2021-06-14 15:58:22 · 971 阅读 · 0 评论