Python机器学习
Cbird-coder
将这人工智障的时代拉回正轨
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
tensorflow2.0在使用keras的Average等数学计算类报错解决方法
今天在构建模型时候,为了方便直接使用了tf2的内置函数 tf.keras.layers.Average tf.keras.layers.Add 结果就是我在用@tf.function进行包裹的时候报错: /Volumes/data_save/code_space/nlp/baidu/model/decoder.py:72 call * object_feature = self.add([encoder_hidden_state,tf.expand_dims(vv_sub,1),tf.e原创 2020-05-27 18:05:12 · 1532 阅读 · 3 评论 -
tf2.0报tf.function错误
错误信息全部信息: WARNING:tensorflow:11 out of the last 11 calls to <function train..train_step at 0x7f6d1843e840> triggered tf.function retracing. Tracing is expensive and the excessive number of trac...原创 2020-02-22 14:43:49 · 10582 阅读 · 10 评论 -
python正则re的详解
python正则表达式中最常用的就是re。 import re Regular expression operations 表达式 说明 . 匹配所有字符串,除\n以外 - 表示字符范围如[0-9],[a-z]等等 * 匹配前面的子表达式多次。要匹配 * 字符,需要转义 + 匹配前面的子表达式多次。要匹配 +字符,需要转义 ^ 匹配以某个字符串开头的内容。如^ab...原创 2019-12-03 16:17:26 · 494 阅读 · 0 评论 -
tensorflow模型restore问题
训练好的模型在恢复时候遇到如下问题: Attempting to use uninitialized value Variable Caused by op u'Variable/read' 但是restore的代码如下: #load model def load_model(model, ckpt_path, session): start_time = time.time...原创 2018-09-16 09:43:27 · 2518 阅读 · 3 评论 -
TensorFlow – failed call to cuInit: CUDA_ERROR_UNKN
驱动安装正常。 执行nvidia-smi可执行 解决方案如下: http://kawahara.ca/tensorflow-failed-call-to-cuinit-cuda_error_unknown/ sudo apt-get install nvidia-modprobe翻译 2019-05-29 09:24:19 · 1151 阅读 · 0 评论 -
pip查看安装包
查看安装的软件以及版本 pip freeze 查看安装的包的具体位置 pip show numpy原创 2019-09-25 10:06:19 · 515 阅读 · 0 评论
分享