
python
neronjust
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
TF1训练时出现 tensorflow.python.framework.errors_impl.InvalidArgumentError: <exception str() failed>
今天用跑TF1的代码时遇到错误: tensorflow.python.framework.errors_impl.InvalidArgumentError: <exception str() failed> 从错误信息看不出来哪里出现问题,定位到出错的代码: 打断点调试,得到具体的错误信息并改正。 ...原创 2021-11-11 23:40:48 · 1573 阅读 · 0 评论 -
TF1 RandomShuffleQueue ‘_3_shuffle_batch/random_shuffle_queue‘ is closed and has insufficient ...
今天在跑TF1code的时候遇到这样一个问题: OutOfRangeError (see above for traceback): RandomShuffleQueue '_3_shuffle_batch/random_shuffle_queue' is closed and has insufficient elements (requested 1, current size 0) [[Node: shuffle_batch = QueueDequeueManyV2[component_types原创 2021-11-09 11:10:58 · 314 阅读 · 0 评论 -
python2.7 import tensorflow 出现 SyntaxError: invalid syntax 错误
python2.7 import tensorflow 出现 SyntaxError: invalid syntax 错误 今天跑一个python2.7+tensorflow1.10的代码的时候,import tensorflow 出现 SyntaxError: invalid syntax 错误。 问题原因: https://github.com/protocolbuffers/protobuf 版本问题 解决方法 pip install protobuf==3.17.3 ...原创 2021-11-05 01:20:40 · 1283 阅读 · 0 评论 -
python数据持久化方法 pickle和joblib
scipy.io.savemat 首先上代码,用scipy.io.savemat将numpy数组持久化保存到mat文件里: scipy.io.savemat('/data/weiyuhua/AFClassification/preprocessed_data_new/data_aug_1.mat', mdict={'trainset': trainset[0:ha...原创 2020-03-14 20:56:22 · 894 阅读 · 0 评论 -
numpy数组与list的转换、切片与深(浅)拷贝
list转np.array: List元素是一维array的情况: a = np.array([1,2]) b = np.array([5,6,7]) c = [a,b] d = np.array(c) 转换成功: 2. List元素是二维array的情况: a = np.array([[1,2],[3,4]]) b = np.array([[5,6,7],[8,9,10]]) c = [a...原创 2020-03-13 21:03:31 · 378 阅读 · 0 评论