
keras
醉小义
学习算法让自己有更大的提升
展开
-
keras之ImageDataGenerator参数详解及用法实例-01
keras图片生成器ImageDataGeneratorkeras.preprocessing.image.ImageDataGenerator(featurewise_center=False, samplewise_center=False, featurewise_std_normalization=False, samplewise_std_normalizati...转载 2018-11-12 16:33:45 · 7646 阅读 · 8 评论 -
Global average Pooling
最近在看关于cifar10 的分类的识别的文章在看all convolution network 中看到中用到一个global average pooling 下面就介绍一下global average pooling 这个概念出自于 network in network 主要是用来解决全连接的问题,其主要是是将最后一层的特征图进行整张图的一个均值池化,形成一个特征点,将这些...转载 2018-11-12 17:00:52 · 309 阅读 · 0 评论 -
AttributeError: 'Node' object has no attribute 'output_masks'
错误:Traceback (most recent call last): File "/home/nianxiongdi/algorithm/deform-conv/scripts/scaled_mnist1.py", line 94, in <module> inputs, outputs, model = get_deform_cnn(use_cpu=False,...原创 2018-11-17 22:08:44 · 9818 阅读 · 3 评论 -
keras之语义分割ImageDataGenerator with masks as labels
与普通的分类不同的是 ,语义分割出来的mask和label都是图片,要是有旋转,颠倒等增强数据集,要保持mask和label一一对应,需要对图片生成器进行处理,用随机种子seed去解决这个问题 1.datagen = ImageDataGenerator( rotation_range=4) and then you could usefor batch in datagen.fl...转载 2018-12-05 15:27:16 · 1995 阅读 · 0 评论 -
对全局平均池化(GAP)过程的理解
对学习Class Activation Mapping(CAM)原文献的时候提到的全局平均池化GAP方法做个简单的知识补充。所谓的全局就是针对常用的平均池化而言,平均池化会有它的filter size,比如 2 * 2,全局平均池化就没有size,它针对的是整张feature map.全局平均池化(Global average Pooling)由 M. Lin, Q. Chen, and ...转载 2018-12-07 16:02:45 · 2983 阅读 · 3 评论 -
keras服务器用fit_generator跑的代码,loss,acc曲线图的保存
import matplotlib.pyplot as plt... //数据处理代码 省略history = model.fit_generator( image_generator, steps_per_epoch=2000 // 32 , epochs=16, verbose=1, validation_data=image_generator_T...原创 2018-12-26 15:49:04 · 4462 阅读 · 3 评论 -
tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid indices:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid indices: [6272,0] = [1, 14, 1, 0] does not index into [3,14,14,512] [[Node: unpool5/ScatterNd = ScatterNd[T=DT_FLOAT, Ti...原创 2018-12-18 20:22:36 · 12080 阅读 · 16 评论 -
keras损失函数源码与函数公式
1.MSEdef mean_squared_error(y_true, y_pred): return K.mean(math_ops.square(y_pred - y_true), axis=-1)以语义分割为例: y_true :shape (224,224,2) y_pred:shape (224,224,2) 代码...原创 2019-01-12 16:50:50 · 4166 阅读 · 0 评论 -
keras:TypeError: __init__() got an unexpected keyword argument 'file'
安装后百度的深度学习框架,自己的keras不能运行了,发现是因为protobuf版本的问题,需要卸载重新安装pip uninstall protobufpip install protobuf就可以正常运行了 ...原创 2019-01-14 15:35:02 · 3371 阅读 · 0 评论