Chainer
latest

Chainer Documents

  • Installation
  • Guides
  • Neural Net Examples
  • Reference
    • Variable and Parameter
    • Functions
    • Link and Chains
      • Learnable connections
      • Activation/loss/normalization functions with parameters
      • Machine learning models
      • Pre-trained models
        • VGG16Layers
        • GoogLeNet
        • Residual Networks
        • Compatibility with other frameworks
      • Link and Chain base classes
    • Optimizers
    • Weight Initializers
    • Training Tools
    • Datasets
    • Iterator
    • Serializers
    • Utilities
    • Configuring Chainer
    • Debug Mode
    • Visualization of Computational Graph
    • Caffe Reference Model Support
    • Caffe Model Export Support
    • Assertion and Testing

Other

  • API Compatibility Policy
  • Contribution Guide
  • Tips and FAQs
  • Upgrade Guide
  • Comparison with Other Frameworks
  • License

Community

  • Slack Chat
  • Forums
  • Examples in Awesome Chainer
Chainer
  • Docs »
  • Reference »
  • Link and Chains »
  • chainer.links.model.vision.googlenet.prepare
  • Edit on GitHub

chainer.links.model.vision.googlenet.prepare¶

chainer.links.model.vision.googlenet.prepare(image, size=(224, 224))[source]¶

Converts the given image to the numpy array for GoogLeNet.

Note that you have to call this method before __call__ because the pre-trained GoogLeNet model requires to resize the given image, covert the RGB to the BGR, subtract the mean, and permute the dimensions before calling.

Parameters:
  • image (PIL.Image or numpy.ndarray) – Input image. If an input is numpy.ndarray, its shape must be (height, width), (height, width, channels), or (channels, height, width), and the order of the channels must be RGB.
  • size (pair of ints) – Size of converted images. If None, the given image is not resized.
Returns:

The converted output array.

Return type:

numpy.ndarray

Next Previous

© Copyright 2015, Preferred Networks, inc. and Preferred Infrastructure, inc.. Revision c0915090.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
stable
v5.0.0a1
v4.0.0
v4
v3.5.0
v3.4.0
v3.3.0
v3.2.0
v3.1.0
v3.0.0
v3
v2.1.0
v2.0.2
v1.24.0
v1.23.0
v1.22.0
v1.21.0
v1.20.0.1
v1.19.0
v1.18.0
v1.17.0
v1.16.0
v1.15.0.1
v1.14.0
v1.13.0
v1.12.0
v1.11.0
v1.10.0
v1.9.1
v1.8.2
v1.7.2
v1.6.2.1
v1.5.1
v1.4.1
v1.3.2
v1.2.0
v1.1.2
v1.0.1
v2-docs-cupy
simple-rtd
math-roman
fix-document
deprecate-zerograd
batch_norm_cudnn2
add-try-trainer-class-tutorial
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.