
机器学习
zhangpeterx
这个作者很懒,什么都没留下…
展开
-
解决报错:tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm.
早上在使用tensorflow时报了下面的错:2019-04-10 10:19:31.648250: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX220...原创 2019-04-10 10:31:43 · 22838 阅读 · 10 评论 -
windows 10 anaconda python 3.7 安装keras-gpu tensorflow-gpu
windows anaconda python3.7 安装keras tensorflow-gpuconda install keras-gpuconda install tensorflow-gpu原创 2019-04-08 17:10:28 · 7590 阅读 · 2 评论 -
Google colab: 修改系统时间 change system time
Google colab对于机器学习来说非常好用,有免费的GPU可以用。注意:一个Google colab的示例最长可以持续12小时,窗口关闭后只会继续跑90分钟。但是因为服务器并不在国内,所以系统时间并不是东八区的时间,但我希望修改时间到北京时间。我先尝试如下命令:!date -R!apt-get install ntpdate!ntpdate ntp.sjtu.edu.cn!d...原创 2019-06-04 14:31:13 · 3537 阅读 · 1 评论 -
keras和tensorflow使用 keras.callbacks.TensorBoard 可视化数据
TensorBoard 是一个非常好用的可视化工具1.数据写入在keras中,使用方法如下:import kerasTensorBoardcallback=keras.callbacks.TensorBoard(log_dir='./logs', histogram_freq=0, write_graph=True, write_images=False, embeddings_fr...原创 2019-06-04 08:58:13 · 11519 阅读 · 1 评论 -
keras和tensorflow 报错解决:UserWarning: Method on_batch_end() is slow compared to the batch update Check
早上在使用keras时报错如下:C:\Users\peter\Anaconda3\lib\site-packages\keras\callbacks.py:122: UserWarning: Method on_batch_end() is slow compared to the batch update (0.115551). Check your callbacks.这是一个警告,可以...原创 2019-06-07 13:17:10 · 7864 阅读 · 1 评论 -
keras和tensorflow使用 fit_generator 批次训练
fit_generator 是 keras 提供的用来进行批次训练的函数,使用方法如下:model.fit_generator(generator, steps_per_epoch=None, epochs=1, verbose=1, callbacks=None, validation_data=None, validation_steps=None, ...原创 2019-06-05 11:57:13 · 5828 阅读 · 0 评论 -
mxnet报错解决:AttributeError: module 'mxnet.context' has no attribute 'num_gpus'
早上在跑mxnet的mnist的示例代码时报错了,代码如下:import mxnet as mxctx = mx.gpu(0) if mx.context.num_gpus() > 0 else mx.cpu(0)报错如下:---------------------------------------------------------------------------Attr...原创 2019-06-05 10:44:15 · 3131 阅读 · 2 评论 -
keras和tensorflow使用 keras.callbacks.EarlyStopping 提前结束训练
一般来说机器学习的训练次数会设置到很大,如果模型的表现没有进一步提升,那么训练可以停止了,继续训练很可能会导致过拟合keras.callbacks.EarlyStopping就是用来提前结束训练的。在keras中,使用方法如下:import kerasearly_stopping=keras.callbacks.EarlyStopping(monitor='val_loss', min_...原创 2019-06-05 10:01:17 · 11313 阅读 · 5 评论 -
我看过的机器学习方面的好文章
本文不定期更新,最后更新于2019-5-18GitHub上实时更新,地址:good-articles-by-sort/机器学习.md机器学习走近流行强化学习算法:最优Q-Learning机器学习 (十) 优化算法利器之梯度下降(Gradient Descend)一文简述多种无监督聚类算法的Python实现聊聊机器学习中的那些树Deep Learning读书笔记(6)–【卷积神经网...原创 2019-05-18 11:56:58 · 411 阅读 · 0 评论 -
图片去噪:python,线性回归
未完待续原创 2019-05-19 22:01:58 · 4820 阅读 · 11 评论 -
keras/tensorflow 模型保存后重新加载准确率为0 model.save and load giving different result
我在用别人的代码跑程序的时候遇到了这个问题:keras 模型保存后重新加载准确率为0GitHub上有个issue:model.save and load giving different result · Issue #4875 · keras-team/keras这个issue有150个回复了,大部分人都是遇到了这个问题。我用tensorflow重写了一遍,没有解决问题。然后我怀疑不是...原创 2019-04-17 12:05:11 · 2220 阅读 · 4 评论 -
报错解决:InvalidArgumentError: Received a label value of 101 which is outside the valid range of [0, 101
报错解决:InvalidArgumentError: Received a label value of 101 which is outside the valid range of [0, 101).早上在使用tensorflow时,产生了如下报错:Traceback (most recent call last): File "<ipython-input-1-b98f58f...原创 2019-04-14 10:10:39 · 8659 阅读 · 10 评论 -
报错解决:ResourceExhaustedError: OOM when allocating tensor with shape
报错解决:ResourceExhaustedError: OOM when allocating tensor with shape早上在使用tensorflow时遇到如下报错:Traceback (most recent call last): File "C:\Users\peter\Anaconda3\lib\site-packages\spyder_kernels\custom...原创 2019-04-14 08:50:16 · 24347 阅读 · 9 评论 -
报错解决:alueError: When using data tensors as input to a model, you should specify the `steps_per_epoch
报错解决:valueError: When using data tensors as input to a model, you should specify the steps_per_epoch argument.晚上在使用tensorflow时报错如下: File "C:\Users\peter\Anaconda3\lib\site-packages\spyder_kernel...原创 2019-04-13 23:14:40 · 13075 阅读 · 2 评论 -
报错解决:InvalidArgumentError: Can not squeeze dim[1], expected a dimension of 1, got
报错解决:InvalidArgumentError: Can not squeeze dim[1], expected a dimension of 1, got 101晚上在使用tensorflow时报错如下:Traceback (most recent call last): File "C:\Users\peter\Anaconda3\lib\site-packages\spyde...原创 2019-04-13 22:45:30 · 13536 阅读 · 2 评论 -
Windows下使用HDFView查看hdf5文件
Windows下使用HDFView查看hdf5文件keras的模型文件是hdf5格式的,可以使用HDFView进行查看。HDFView下载地址:HDF® View - The HDF GroupHDFView-3.1.0版本的下载地址是:HDFView-3.1.0-win10vs14_64.zip注意:该网站要求你先注册账号,然后才能下载安装完成后可以打开软件如下图但还不能直接使用,因...原创 2019-04-13 19:23:36 · 29689 阅读 · 9 评论 -
如何在Keras中检查深度学习模型(翻译)
本文翻译自:How to Check-Point Deep Learning Models in Keras深度学习模型可能需要数小时,数天甚至数周才能进行训练。如果意外停止运行,则可能会丢失大量工作。在这篇文章中,您将了解如何使用Keras库在Python培训期间检查您的深度学习模型。让我们开始吧。2017年3月更新:Keras 2.0.2,TensorFlow 1.0.1和The...原创 2019-04-11 10:27:56 · 504 阅读 · 0 评论 -
windows 10 anaconda python 3.7 安装 pytorch-gpu
windows anaconda python 3.7 安装 pytorch注意:如果安装GPU版pytorchconda install pytorch torchvision cudatoolkit=10.0 -c pytorch安装CPU版pytorchconda install pytorch-cpu torchvision-cpu -c pytorch...原创 2019-04-09 21:16:11 · 5955 阅读 · 0 评论