nn pic model preprocess note
2017-04-13 16:41
246 查看
inception 预处理
https://github.com/fchollet/keras/blob/master/keras/applications/inception_v3.pydef preprocess_input(x): x /= 255. x -= 0.5 x *= 2. return x
vgg 预处理
if len(x.shape) == 3: #print("[INFO] channel:{}".format(data_format)) if data_format == 'channels_first': x = x.transpose(2, 0, 1) elif len(x.shape) == 2: if data_format == 'channels_first': x = x.reshape((1, x.shape[0], x.shape[1])) else: x = x.reshape((x.shape[0], x.shape[1], 1)) else: raise ValueError('Unsupported image shape: ', x.shape)
im[:,:,0] -= 103.939 im[:,:,1] -= 116.779 im[:,:,2] -= 123.68
top2
try
_________________________________________________________________ Layer (type) Output Shape Param # ================================================================= input_1 (InputLayer) (None, 224, 224, 3) 0 _________________________________________________________________ block1_conv1 (Conv2D) (None, 224, 224, 64) 1792 _________________________________________________________________ block1_conv2 (Conv2D) (None, 224, 224, 64) 36928 _________________________________________________________________ block1_pool (MaxPooling2D) (None, 112, 112, 64) 0 _________________________________________________________________ block2_conv1 (Conv2D) (None, 112, 112, 128) 73856 _________________________________________________________________ block2_conv2 (Conv2D) (None, 112, 112, 128) 147584 _________________________________________________________________ block2_pool (MaxPooling2D) (None, 56, 56, 128) 0 _________________________________________________________________ block3_conv1 (Conv2D) (None, 56, 56, 256) 295168 _________________________________________________________________ block3_conv2 (Conv2D) (None, 56, 56, 256) 590080 _________________________________________________________________ block3_conv3 (Conv2D) (None, 56, 56, 256) 590080 _________________________________________________________________ block3_pool (MaxPooling2D) (None, 28, 28, 256) 0 _________________________________________________________________ block4_conv1 (Conv2D) (None, 28, 28, 512) 1180160 _________________________________________________________________ block4_conv2 (Conv2D) (None, 28, 28, 512) 2359808 _________________________________________________________________ block4_conv3 (Conv2D) (None, 28, 28, 512) 2359808 _________________________________________________________________ block4_pool (MaxPooling2D) (None, 14, 14, 512) 0 _________________________________________________________________ block5_conv1 (Conv2D) (None, 14, 14, 512) 2359808 _________________________________________________________________ block5_conv2 (Conv2D) (None, 14, 14, 512) 2359808 _________________________________________________________________ block5_conv3 (Conv2D) (None, 14, 14, 512) 2359808 _________________________________________________________________ block5_pool (MaxPooling2D) (None, 7, 7, 512) 0 _________________________________________________________________ flatten (Flatten) (None, 25088) 0 _________________________________________________________________ fc1 (Dense) (None, 4096) 102764544 _________________________________________________________________ fc2 (Dense) (None, 4096) 16781312 _________________________________________________________________ logit (Dense) (None, 1) 4097 =================================================================
相关文章推荐
- Java Instance return model note!
- [翻译]斯坦福CS 20SI:基于Tensorflow的深度学习研究课程笔记,Lecture note 4: How to structure your model in TensorFlow
- (OK) error: code model kernel does not support PIC mode
- Java Instance return model note!
- error reading 'pic' error: no analyzer checkers are associated with '-mrelocation-model'
- Max Entropy Model study note
- Note for video Machine Learning and Data Mining——Linear Model
- ML_note:NN_backpropagation
- Write Note-InterModel
- Inside The C++ Object Model :note (1)
- HBase note. Data model
- 百度文库机器学习第七节note model combination
- Java Instance return model note!
- Inside the C++ Object Model:note(2)
- Note for video Machine Learning and Data Mining——Linear Model
- Inside The C++ object model:note(3)
- WPF Study Note: Model/View/ViewModel pattern
- train model note
- CalTech machine learning, video 9 Review note(the Linear Model II)
- READING NOTE: Face Detection with End-to-End Integration of a ConvNet and a 3D Model