Utilities

Convolution/Deconvolution utilities

chainer.utils.get_conv_outsize

Calculates output size of convolution.

chainer.utils.get_deconv_outsize

Calculates output size of deconvolution.

Common algorithms

chainer.utils.WalkerAlias

Implementation of Walker's alias method.

Common utilities

chainer.print_runtime_info

Shows Chainer runtime information.

Reporter

chainer.Reporter

Object to which observed values are reported.

chainer.get_current_reporter

Returns the current reporter object.

chainer.report

Reports observed values with the current reporter object.

chainer.report_scope

Returns a report scope with the current reporter.

Summary and DictSummary

chainer.Summary

Online summarization of a sequence of scalars.

chainer.DictSummary

Online summarization of a sequence of dictionaries.

Sparse utilities

A chainer.Variable can be converted into a sparse matrix in e.g. COO (Coordinate list) format. A sparse matrix stores the same data as the original object but with a different internal representation, optimized for efficient operations on sparse data, i.e. data with many zero elements.

Following are a list of supported sparse matrix formats and utilities for converting between a chainer.Variable and these representations.

Note

Please be aware that only certain functions accept sparse matrices as inputs, such as chainer.functions.sparse_matmul().

chainer.utils.CooMatrix

A sparse matrix in COO format.

chainer.utils.to_coo

Returns a single or a batch of matrices in COO format.

Experimental feature annotation

chainer.utils.experimental

Declares that user is using an experimental feature.