tensorflow
文章平均质量分 54
tensorflow的学习记录
Jucway
万一努力的尽头是你呢?
展开
-
【实战】tensorflow 花卉识别
花卉识别!原创 2021-12-20 20:19:02 · 2455 阅读 · 3 评论 -
【tensorflow】&【pytorch】_debug_错误集合
【tensorflow_debug】---集合日常实验遇到的一些bug记录,方便自己查看,避免时间花在搜索上!原创 2021-06-05 17:14:13 · 203 阅读 · 0 评论 -
【tensorflow】 GPU 显存分配设置
import os import tensorflow as tf config = tf.ConfigProto() config.gpu_options.per_process_gpu_memory_fraction = 0.5 # 控制占用显卡最高显存为50%, 这个提供多人使用 config.gpu_options.allow_growth = True # 设置动态分配GPU os.environ["CUDA_VIS.原创 2021-05-11 22:57:22 · 1471 阅读 · 0 评论 -
【tensorflow】安装cuda10.0 and cudnn 7.5.0 and tensorflow-gpu==1.14.0
安装cuda 的一天使用实验室同学下载好的cuda安装报错文件直接传:7zip Data error:原因是安装文件损坏,重新下载安装包下载cuda 10.0版本官网安装中断:开了vpn会影响下载的中断,这个时候关掉vpn下载cudnn与cuda对应版本我安装的是tensorflow-gpu==1.14.0对于cuda版本10.0cudnn = =7.5.0,这个在下载的时候要和cuda 版本对应安装cuda安装过程网上参考博客很多(我基本是下一步)下载好cu原创 2021-04-21 21:30:11 · 659 阅读 · 0 评论 -
【tensorflow】tf-tf.where(condition, x, y, name)
def where_v2(condition, x=None, y=None, name=None):参数只有condition;tf.where([True,False,False,True])return: <tf.Tensor:shape=(2,1),dtype=int64,numpy=array([[0],[3]])tf.where([[True,False],[False,True]])*tf.Tensor:shape=(2,2),dtype=int64,nump.原创 2021-03-28 15:37:09 · 246 阅读 · 0 评论 -
【tensorflow】tf-argmax()
import tensorflow as tfinput = [1, 3, 5, 7]output = ([[1, 2],[3, 5]])a = tf.argmax(input, 0) # 0表是按行b = tf.argmax(output, 1) # 1 表示按列with tf.Session() as sess: print("输出input最大值的索引下标:", sess.run(a)) print("输出output最大值的索引下标,这是一原创 2021-03-28 15:09:25 · 80 阅读 · 0 评论 -
【tensorflow】module ‘tensorflow.python.keras.utils.generic_utils‘ has no attribute populate_dict_with
遇到这个问题参考:https://stackoverflow.com/posts/61347413/editmodule ‘tensorflow.python.keras.utils.generic_utils’ has no attribute ‘populate_dict_with_module_objects’解决办法1:pip install tensorflow==2.1.0解决办法2:copy “populate_dict_with_module_objects” funct原创 2021-03-19 22:42:33 · 30251 阅读 · 28 评论