![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tensorflow2.0
心心喵
这个作者很懒,什么都没留下…
展开
-
[python] module ‘tensorflow.compat.v2‘ has no attribute ‘_internal‘
tensorflow2的安装问题tensorflow2.5要求安装python3.9/8,对应版本keras是测试版本tensorflow2.2.0安装时,会出现 module ‘tensorflow.compat.v2’ has no attribute ‘_internal’的报错tensorflow2.3.0 keras2.4 不会出现版本问题...原创 2021-07-17 00:28:05 · 2551 阅读 · 1 评论 -
[tensorflow] 测试tensorflowgpu版本是否可用
import tensorflow as tfprint(tf.test.is_gpu_available())原创 2021-05-13 23:31:34 · 902 阅读 · 0 评论 -
[tensorflow] sklearn包中label_binarize和model_selection.train_test_split
sklearn文档:https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.label_binarize.html#sklearn.preprocessing.label_binarizesklearn.preprocessing.label_binarize类的顺序被保留:from sklearn.preprocessing import label_binarizelabel_binarize([1, .原创 2021-04-17 23:15:59 · 262 阅读 · 0 评论 -
[tensorflow2.0] gpu配置代码
# -*- coding:utf-8 -*-# Created by LuoJie at 12/5/19import tensorflow as tfimport osdef config_gpu(use_cpu=False, gpu_memory=6): if use_cpu: os.environ['CUDA_VISIBLE_DEVICES'] = '1' ...原创 2020-03-13 17:12:57 · 632 阅读 · 0 评论 -
[nlp] 抽提式文本摘要
抽提式文本摘要 所有摘要的词都来自于原文字 bert 比较慢生成式文本摘要 类似人类提取摘要的方法原创 2020-02-10 18:25:07 · 365 阅读 · 0 评论 -
[tf 2.0] %load_ext autoreload自动加载
https://www.jianshu.com/p/58976e5276a3https://www.cnblogs.com/douzujun/p/10328057.html %load_ext autoreload %autoreload 2命令参数如下所示:%autoreload: 自动重载%aimport排除的模块之外的所有模块。%autoreload 0: 禁用自动重载%au...原创 2020-01-21 20:05:21 · 1402 阅读 · 0 评论 -
[tf 2.0] padded_batch_use
参考:tf2.0中输出 不用sess.runhttps://stackoom.com/question/3nd25/%E5%BB%BA%E8%AE%AE%E5%9C%A8tensorflow-%E4%B8%AD%E8%B0%83%E8%AF%95-tf-data-Dataset-%E6%93%8D%E4%BD%9Cpadded_batch用法https://blog.csdn.net/z...原创 2020-01-11 17:12:54 · 463 阅读 · 0 评论