cnn_train.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Pedestrian-Recognition 作者: yugrocks 项目源码 文件源码
def predict(model, img):

    #Flatten it
    image = np.array(img).flatten()


    # float32
    image = image.astype('float32') 

    # normalize it
    image = image / 255

    # reshape for NN
    rimage = image.reshape(1, img_rows, img_colms,img_channels)

    # Now feed it to the NN, to fetch the predictions
    clas = model.predict(rimage)
    #prob_array = model.predict_proba(rimage)

    return  clas
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号