摘要:        
from keras.utils.np_utils import * # 类别向量定义 b = [0, 1, 2, 3, 4, 5, 6, 7, 8] # 调用to_categorical将b按照9个类别来进行转换 b = to_categorical(b, 9) print(b) 来源:https    阅读全文
        
            posted @ 2019-08-26 23:10
一杯明月
阅读(5788)
评论(0)
推荐(0)
        
            
        
        
摘要:        
img = np.array(im) R,G,B=im.split() r=np.array(R) g=np.array(G) b=np.array(B) print(r[0]) print(g[0]) print(b[0]) print(im.getpixel((0,0)))    阅读全文
        
            posted @ 2019-08-26 20:18
一杯明月
阅读(799)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1. 数组的操作: import numpy as np a = np.array([[1, 2], [3, 4]]) print(a) print(type(a)) print(np.mean(a)) print(np.mean(a, axis=0)) # axis=0,计算每一列的均值 prin    阅读全文
        
            posted @ 2019-08-26 16:25
一杯明月
阅读(29824)
评论(0)
推荐(0)
        
            
        
        
摘要:        
import numpy as np from PIL import Image import pickle import os CHANNEL = 3 WIDTH = 32 HEIGHT = 32 data = [] labels=[] classification = ['airplane','automobile','bird','cat','deer','dog','frog...    阅读全文
        
            posted @ 2019-08-26 13:34
一杯明月
阅读(1218)
评论(0)
推荐(0)
        
 
                    
                     
                    
                 
                    
                 
 
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号