![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
keras
玉米玉米不开花
这个作者很懒,什么都没留下…
展开
-
一个GPU上跑多个模型
os.environ[‘CUDA_VISIBLE_DEVICES’] = ‘1’1 动态申请显存1.1 方法一tf_config = tf.compat.v1.ConfigProto()tf_config.gpu_options.allow_growth = Truesession = tf.compat.v1.Session(config=tf_config)1.2 方法二gpu_options=tf.GPUOptions(allow_growth = True)config=tf.Con原创 2021-07-07 09:51:49 · 2886 阅读 · 0 评论 -
小白可用网络可视化工具
适用多种网络格式,仅需模型即可在线查看网络结构。网址:https://lutzroeder.github.io/netron/详细步骤请看:https://blog.csdn.net/nan355655600/article/details/106245563原创 2021-07-07 09:37:20 · 94 阅读 · 0 评论 -
Anaconda中加载imblearn库出现问题,pip install imblearn出现问题
下载 conda install -c conda-forge imbalanced-learnhttps://blog.csdn.net/weixin_41013322/article/details/102963352原创 2020-08-06 19:17:45 · 968 阅读 · 0 评论 -
anacodna 查看 创建 删除命令
查看环境:conda info --env创建python环境:conda create --name tensorflow python=3.6激活环境:activate tensorflow下载一些包:conda install conda删除环境:conda remove -n tensorflow --all...原创 2020-02-16 14:34:05 · 145 阅读 · 0 评论 -
keras中的ResNet-50和SENet结合。
参考caffe:https://github.com/hujie-frank/SENetdef expand_dim_backend(self,x): x1 = K.reshape(x,(-1,1,256)) print('x1:',x1) return x1def multiply(self,a): x = np.multiply(a[0], a[1]) ...原创 2019-06-06 20:32:19 · 5469 阅读 · 3 评论 -
Keras的Tensorflow后端可以随意CPU或GPU。
参考:https://cloud.tencent.com/developer/ask/36434import tensorflow as tffrom keras import backend as Knum_cores = 4if GPU:num_GPU = 1num_CPU = 1if CPU:num_CPU = 1num_GPU = 0config = tf.Config...原创 2019-06-08 16:25:46 · 258 阅读 · 0 评论 -
UnicodeEncodeError: 'gbk' codec can't encode character '\u2022' in position 4: illegal multibyte seq
UnicodeEncodeError: ‘gbk’ codec can’t encode character ‘\u2022’ in position 4: illegal multibyte seq将with open(‘pos.fasta’,'a‘) as fw:改为with open(‘pos.fasta’,‘a’,encoding=‘utf-8’) as fw:...原创 2019-07-17 15:46:26 · 1325 阅读 · 0 评论 -
错误:W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at transpose_op.cc:199
2019-07-23 10:05:55.269273: W tensorflow/core/common_runtime/bfc_allocator.cc:267] Allocator (GPU_0_bfc) ran out of memory trying to allocate 1.16GiB. Current allocation summary follows.2019-07-23 1...原创 2019-07-23 10:28:57 · 12693 阅读 · 2 评论