- 博客(15)
- 收藏
- 关注
转载 多GPU 模型保存方法
multi gpuValueError: You are trying to load a weight file containing 1 layers into a model with xxxlayers.we can not directly filter the name out.we need to actually load all layers instead...
2019-10-11 10:21:12 302
转载 ubuntu升级python版本(3.5 -> 3.6)
https://www.cnblogs.com/vevy/p/11147487.html 1 2 3 4 5 6 7 8 9 10 #获取最新的python3.6,将其添加至当前apt库中,并自动导入公钥 $ sudo add-apt-repository ppa:jonat...
2019-09-20 19:55:04 192
原创 OOM参考方法 待验证
https://blog.csdn.net/ONE_SIX_MIX/article/details/82080331将batch再分成多个 subbatch 之后累计本轮的梯度。前提是 batchesize=1的时候不能OOM另外还有一个分成多个cache 每个cache 分成多个batch那意思是这样:总数据 train_data = 1w从总数据中分...
2019-06-22 09:57:21 216
原创 DuplicateFlagError: The flag 'xxx' is defined twice.
DuplicateFlagError: The flag 'xxx' is defined twice.def del_all_flags(FLAGS): flags_dict = FLAGS._flags() keys_list = [keys for keys in flags_dict] for keys in keys_list:...
2019-06-22 08:38:59 2471
原创 tensorflow 保存模型 加载模型
1、训练的时候 保存模型不要太大,太大restore会有问题saver = tf.train.Saver()if FLAGS.reloading: # Initialize variables session.run(tf.global_variables_initializer()) # Initialize target n...
2019-06-21 20:19:48 220
原创 tensorflow GPU 使用
gpu Cannot assign a device for operation Operation was explicitly assigned to换成GPU 之后跑resnet跑不起来。。。。 之前好像训练都忘了用GPU了,并且把sess = tf.Session()改成sess = tf.Session(config=tf.ConfigProto(al...
2019-06-21 11:56:34 343
原创 ValueError: Shape must be rank 1 but is rank 0 ' ' 类报错结局方案
这个问题个人感觉是你放了不该放tensor 的地方,比如一个keras 是theano backened,但是人为非得push一个tensorflow的格式进去,我就是这个问题,最后把keras换成tensorflow,问题解决格式问题其实是最重要的,有个版本的解释是不要input scalar但是要input tensor,不是数据本身的问题,也许是接收数据方的问题...
2019-06-20 20:31:13 8448 1
原创 Cannot assign a device to node
withg.device("/gpu:0"):def device_for_node(n): if n.type == "MatMul": return "/gpu:0" else: return "/cpu:0"with g.as_default(): with g.device(device_for_node):如果 GPU 不可用,...
2019-05-14 19:57:46 295
原创 install wheel
import pip._internal print(pip._internal.pep425tags.get_supported()) 替换第一个tuple就行 回滚anaconda conda install python=3.6
2019-05-08 00:28:15 375
原创 python sort sorted
sort针对listsorted生成新的listPython 字典(Dictionary) items() 函数以列表返回可遍历的(键, 值) 元组数组。dict.values()
2019-05-07 11:37:18 118
原创 生成器VS列表
在涉及到需要遍历列表而不是针对列表的某个值操作时,使用生成器代替列表可以减少内存的消耗。虽然看不到里面内容但是生成器不占地方,list占地方 可以看到内容...
2019-05-06 18:44:11 194
转载 正则化前特殊字符 u r b
u/U:表示unicode字符串 (经过转码)不是仅仅是针对中文, 可以针对任何的字符串,代表是对字符串进行unicode编码。一般英文字符在使用各种编码下, 基本都可以正常解析, 所以一般不带u;但是中文, 必须表明所需编码, 否则一旦编码转换就会出现乱码。建议所有编码方式采用utf8r/R:非转义的原始字符串(不经过转码)与普通字符相比,其他相对特殊的字符,其中可能包含转...
2019-05-05 11:46:57 490
原创 No module named '_jpype'
ctr+k+z退出交互界面No module named '_jpype'安裝Jpype,conda install -c conda-forge jpype1测试是否按照成功:from jpype import *startJVM(getDefaultJVMPath(), "-ea")java.lang.System.out.println("Hell...
2019-05-05 11:31:19 7108
原创 tensorflow 回滚
由于tensorflow版本不同,可能一些函数的调用也有变换,这时候可能需要查看tensorflow版本,可以在终端输入查询命令如下:pythonimport tensorflow as tftf.__version__查询tensorflow安装路径为:tf.__path__通过卸载安装指定版本的tensorflow,可以顺利运行tensorflow首先:卸载已经...
2019-05-04 20:57:03 1581
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人