A flexible framework of neural networks for deep learning
MIT License
Published by mitmul about 7 years ago
This is the v3 beta release. See here for the complete list of solved issues and merged PRs.
CuPy has also been updated to v2.0.0b1. Please see the release notes for CuPy. In particular, the updates on memory allocator may be relevant to many existing users of Chainer.
This change provides the core API support of writing functions that support
backward
can skip computation of unnecessary input gradients)You can write your own function node by implementing a subclass of FunctionNode
. The following is a simple example of writing an elementwise multiplication function (which is already provided by this beta version):
class ElementwiseAdd(chainer.FunctionNode):
def check_type_forward(self, in_types): ...
def forward(self, inputs):
lhs, rhs = inputs
self.retain_inputs((0, 1)) # New-style function does not retain inputs by default!!!
return lhs * rhs,
def backward(self, indexes, grad_outputs):
grad_out, = grad_outputs
lhs, rhs = self.get_retained_inputs()
return rhs * grad_out, lhs * grad_out
There are mainly three differences from the conventional definition using Function
.
index
(or target_input_indexes
as the full name) is added. It indicates the set of inputs for which gradients are required. There are two ways to return gradients by backward
: gradients for all inputs, or gradients for inputs selected by indexes
. In the latter case, you can skip computing the gradients for inputs not listed in indexes
.backward
method implements computation on top of Variable
instead of ndarray
so that the resulting gradients can be further backpropagated. The grad_outputs
is a tuple of Variable
s, and the new get_retained_inputs()
and get_retained_outputs()
methods return a tuple of Variable
s corresponding to retained inputs/outputs. Note that the inputs are not retained by default (which is also different from Function
).apply()
method instead of __call__()
operator.There is also a variant of backward()
method named backward_accumulate()
which includes the accumulation of input gradients to existing ones. It enables us to improve the performance in some case.
This change also provides the following changes.
FunctionAdapter
provides an implementation of FunctionNode
interface on top of Function
interface. It can be used to convert Function
into new-style function nodes. Note that it does not mean the converted function supports differentiable backprop; it is required to rewrite the implementation with FunctionNode
directly to support it.Function.__call__
is updated so that users do not need to update their implementation of custom Function definitions; it automatically creates a FunctionAdapter
object, lets the adapter wrap the Function
object itself, and inserts the adapter object (which implements FunctionNode
) into the computational graph.+
and *
) and F.identity
(which exists just for testing purpose) supports differentiable (and economical) backprop. We are planning to widen the set of functions with differentiable backprop support in the up-coming releases.FunctionNode
objects act as function nodes in the computational graph, and Function
is just an object referenced by a FunctionAdapter
object (which implements FunctionNode
).Trainer
, any exceptions raised during training are now immediately shown before entering the finalization procedures. It helps users to know the cause of the error before waiting for the finalization which sometimes hangs up (esp. when using multiprocessing) (#2216)F.simplified_dropconnect
(#2534, thanks @fukatani!)load_npz
to skip non-existing entries (#2599 #2601)L.Classifier
is extended so that users can feed multiple input features. An argument that should be treated as the ground truth labels is specified by label_key
option. Keyword arguments are also supported. (#2834)print_report()
and summary()
method to TimerHook
(#2927)F.upsampling_2d
(#2978)chainer.testing.fix_random
decorator to make tests deterministic (#2985)F.selu
activation function (#2989)iter_per_epoch
option to get_trainer_with_mock_updater
(#2913, thanks @Hakuyume!)chainer.training
(#3032)np.einsum
in foward_cpu
of negative sampling (#2931)Variable
on device (#2983)TimerHook
reentrant (#3019)interval_trigger
on resuming the training procedure (#2244 #2484, thanks @Hakuyume!)ManualScheduleTrigger
(#2988, thanks @Hakuyume!)np.zeros
as the initialization of arrays to return in the CPU-mode F.roi_pooling_2d
(#2872, thanks @yuyu2172!)mock
as an installation dependency (#2973 #2992)Updater
(#3012, thanks @fiarabbit!)MultiprocessParallelUpdater
(#3038)F.softmax
(#2362)F.tile
(#2825)F.upsampling_2d
(#2977)StandardUpdater
and ParallelUpdater
(#2993)Link.disable_update
(#3061, thanks @Hakuyume!)Link.__call__
(#3007)conf.py
(#3064)Link
(#2974)get_trainer_with_mock_updater
in tests of ManualScheduleTrigger
(#2987, thanks @Hakuyume!).gitignore
(#3050)Published by delta2323 about 7 years ago
This revision release contains bug fixes and improvements to the documentation and installation procedure. See here for the complete list of solved issues and merged PRs.
L.NStepGRU
, L.NStepBiGRU
, L.NStepLSTM
, L.NStepBiLSTM
, L.NStepRNNTanh
, L.NStepRNNReLU
, L.NStepBiRNNTanh
, and L.NStepRNNReLU
(#2964, thanks @tomohideshibata!)F.squared_error
(#2963), chainer.Parameter
(#2965) and chainer.VariableNode
(#2965) to the document.Variable.__init__
(#2965), F.Upsampling2D
(#2986), chainer.training.StandardUpdater
(#3009), chainer.training.ParallelUpdater
(#3009), chainer.Link.__call__
(#3025, thanks @Hakuyume!), chainer.training.MultiprocessParallelUpdater
(#3039)F.tile
(#3034, thanks @keisuke-umezawa!), chainer.training.Updater
(#3058, thanks @fiarabbit!).mock
package in installation (#2986)F.ROIPooling
. (#3003, thanks @yuyu2172!)chainer.Parameter
(#3014)gradient_check.numerical_grad
on GPU (#3021)einsum
in forward_cpu
of F.negative_sampling
(#3026).gitignore
(#3052)Published by delta2323 over 7 years ago
This revision release contains bug fixes and improvements to the documentation and installation procedure. See here for the complete list of solved issues and merged PRs.
MaxPoolingND
(#2917)get_device
, which is deprecated (#2924)init_scope
instead of deprecated methods to register links and parameters (#2947)cleargrads
instead of zerograds
(#2956)F.pad_sequence
error on 64bit Windows GPU (#2867, thanks @ronekko)update_core()
(#2878)get_trainer_with_mock_updater
(#2887, thanks @Hakuyume)repr
and str
failure when data is None
(#2902)MultiProcessUpdater
(#2914).F.pad_sequence
to the reference (#2884, thanks @YamaneSasuke!)ResNetLayers
arguments of `n_layers in the ResNet example (#2882)Evaluator
instead of TestModeEvaluator
in the data-parallel example (#2886)Published by mitmul over 7 years ago
This is the alpha release of v3. See here for the complete list of solved issues and merged PRs.
F.matmul
is changed so that the behavior is compatible with numpy.matmul
. This change affects existing code that uses F.matmul
.
F.matmul
is changed so that it is compatible with numpy.matmul
(#2426, thanks @fukatani!)F.layer_normalization
is added and it improves the performance of L.LayerNormalization
(#2857)initializers.LeCunNormal
(#2764)stream
option of cuda.to_gpu
is now deprecated.
init_scope
in built-in links (#2934, #2949)itervalues
for performance (#2895)_check_grad_type
(#2894)get_device
from the internal code (#2890)F.dropout
forward (#2873)
stream
option not working with to_gpu
(#2907, thanks @kmaehashi!)F.pad_sequence
error on 64bit Windows GPU (#2866, thanks @ronekko!)None
in HyperparameterProxy
descriptor (#2852)get_trainer_with_mock_updater
(#2824, thanks @Hakuyume!)MultiprocessParallelUpdater
(#2811, #2817)repr
and str
failure when data is None
(#2787, #2806)
.github
(#2750, #2774)F.pad_sequence
(#2863, thanks @YamaneSasuke!)Hyperparmaeter
and UpdateRule
(#2826)squared_error
(#2940)ParameterStatistics
extension (#2799, thanks @hvy!)BestValueTrigger
(#2819)flatten
, reshape
(#2678)L.BatchNormalization
(#2900, #2926)Link
(#2814, thanks @chantera!)Variable
(#2827)F.squared_error
and F.mean_squared_error
(#2941)
Evaluator
instead of TestModeEvaluator
in the data-parallel example (#2816)
get_device
in tests (#2950)assertRegexp
with assertRegex
(#2946)cleargrads
instead of zerograds
(#2945)DebugMode
with using_debug
(#2933)TrainerTest
where elapsed time had been zero with imprecise clock (#2853, #2855)Published by beam2d over 7 years ago
This is the second major version. See the list for the complete list of solved issues and merged PRs (the list only shows the difference from v2.0.0b1; see the Release Note section below for the difference from v1.24.0).
It should be noted that these release notes contain only the differences from v2.0.0b1. See the release notes of v2.0.0a1 and v2.0.0b1 to confirm the full set of changes from v1.
L.StatelessGRU
and change the implementation of L.GRU
(#2769)transpose_sequence
(#2631)select_item
(#2630)get_item
(#2629)copy
(#2627)cast
(#2623)broadcast
(#2622)depth2space
(#2626)chainer.config.cudnn_deterministic
: cuDNN Deterministic mode (#2574, #2710)wscale
option from L.MLPConvolution2D
(#2690)Extension.initialize
and remove invoke_before_training
(#2639, #2611)None
serializable (#2638)cleargrads
instead of zerograds
by default (#2521, #2549)requires_grad
property to Variable
(#2493)repr
function of Variable
(#2455, thanks @fukatani!)L.Linear
and convolution-like links related to the bias argument (#2180, #2185)Optimizer
(#2509, #2404)L.ConvolutionND
and L.DeconvolutionND
(#2018)functions
and links
(#2755)volatile
flag is given (#2718)Copy.backward
to check input device (#2668)AlexFp16
example (#2637)VariableNode
to add creator
setter (#2770)None
(#2789, #2791)EmbedID
(#2694, thanks @odanado!)DebugPrint
extension to support removed inputs (#2667)The following PR has been sent to v1.24.0 and merged but we mistakenly failed to add this PR to the previous release note, so now we list this up here and appreciate @himkt for the contribution!
chainer.datasets.split_dataset_random
(#2613, thanks @himkt!)get_device_from_id
and get_device_from_array
(#2759)L.Convolution2D
(#2757)F.softmax
(#2751, thanks @tma15!)L.DilatedConvolution2D
(#2689)use_cleargrads
from tutorial (#2645)Published by mitmul over 7 years ago
This is a minor release. See the list for the complete list of solved issues and merged PRs.
_v2
branch into master
. It is predicted that many PRs targeted to the current master will be made obsolete (i.e., they will conflict with the v2 source tree).MultiprocessParallelUpdater
is added. It is an updater for Trainer
that accumulates the gradients computed by multiple processes using multiprocessing
and NCCL.reduce
option is added to loss functions. By passing reduce=’no’
, we can let the loss function not aggregate the loss values across data in the mini-batch.MultiprocessParallelUpdater
: a new version of parallel updater using multiprocessing and NCCL (#2213, #2724, thanks @jekbradbury (#1924) and @anaruse (#1895)!)ParameterStatistics
extension that accumulates various statistics of parameter arrays (#2166, thanks @hvy!)reduce
option to the following loss functions. You can use these loss functions without taking summation/average over the mini-batch by passing reduce=’no’
.
F.softmax_cross_entropy
(#2325, #2357, thanks @Hakuyume!)F.gaussian_kl_divergence
(#2519)F.bernoulli_nll
(#2525)F.gaussian_nll
(#2526)F.crf1d
(#2559)F.huber_loss
(#2560)F.hinge_loss
(#2577)F.black_out
(#2600)F.contrastive
(#2603)F.connectionist_temporal_classification
(#2658)F.triplet
(#2681)F.cross_covariance
(#2697)F.decov
(#2698)F.negative_sampling
and L.NegativeSampling
(#2704)DatasetMixin
(#2427)keepdims
option to F.average
and F.mean
(#2508)TransformDataset
: dataset wrapper to transform each data point by an arbitrary callable (#2513)F.gaussian_kl_divergence
, F.bernoulli_nll
, and F.gaussian_nll
(#2520)F.simplified_dropconnect
and L.SimplifiedDropconnect
: simplified version of DropConnect (#1754, thanks @fukatani!)F.depthwise_convolution_2d
and L.DepthwiseConvolution2D
: depthwise convolution layer used in separable convolution (#2067, thanks @fukatani!)F.spatial_transformer_sampler
: 2d image differentiable sampler from “Spatial Transformer Networks” (#2272, thanks @yuyu2172!)F.spatial_transformer_grid
: function to generate sampling points of STN (#2458, thanks @yuyu2172!)L.GoogLeNet
: pretrained GoogLeNet (#2424, thanks @ronekko!)F.im2col
: differentiable version of im2col (#2466, thanks @yuyu2172!)F.n_step_rnn
, F.n_step_birnn
(#2467)F.n_step_bilstm
, L.NStepBiLSTM
(#2469)F.n_step_gru
, F.n_step_bigru
, L.NStepGRU
, L.NStepBiGRU
(#2470)F.squared_error
and F.absolute_error
: elementwise squared/absolute error (#2566, thanks @Hakuyume!)F.softmax
supports axis
option (#2536, #2538 thanks sergeant-wizard!)cupy.sum
supports keepdims
argument (#2507)F.NStepLSTM
is removed (#2504)F.batch_normalization
(#2582 thanks @soramichi!)F.spatial_transformer_sampler
(#2676 @yuyu2172!)cupy.fuse
behavior for *args
(#2594 thanks @jekbradbury!, #2598)SoftmaxCrossEntropy
on numpy==1.9 (#2719)ignore_label
is not -1 (#2715 thanks @musyoku!, #2716)cupy.ndarray.fill
(#2723)split_axis
function works when its result has zero-dimensional arrays (#2524)F.DilatedConvolution2DFunciton
(#2665 thanks @soramichi!)chainer.Link
(#2711, #2712 thanks @ysekky!)--model
argument in PTB example to specify model file (#2617)epoch_detail
behavior of mocked trainer (#2472, thanks @Hakuyume!)contrastive
test (#2604)gaussian_kl_divergence
test (#2605)Highway
test (#2650)show_name
functionality of the computational graph (#2517, thanks @sergeant-wizard!)F.stack
test (#2532)chainer.functions
alias in tests (#2541)max_pooling_2d
in GPU cases (#2589, thanks @soramichi!).pep8
file for style checking (#2602)Published by mitmul over 7 years ago
This is a minor release. See the list for the complete list of solved issues and merged PRs.
We have recently released v2.0.0b1. See here for the release note and how to try the latest v2 prerelease. The following note is repeated from the release note of v2.0.0b1.
We are planning the v2.0.0 release on May 16 (the schedule might be changed), and the final regular release of v1 is scheduled on May 9. Any PRs left after this final v1 update will not be merged, and at the release of v2.0.0 we will make the master
branch refer to the current _v2
branch. It will make the ongoing PRs conflicting with the new target.
If you are planning to send a new PR to Chainer, we strongly recommend to write your code on top of the _v2 branch and set the target branch to it. As for the ongoing PRs that are hard to meet the deadline of the final regular v1 update, it is also recommended to switch the target to v2 and start resolving any merge conflicts.
remove_variable
option to build_computational_graph
to render a function-only graph (#156 #2207)ManualScheduleTrigger
, for Trainer. Given a list of integers or a single integer and triggering unit ('epoch'
or 'iteration'
, this trigger is fired at all timings given in the list/integer. (#2181, Thanks @naoto0804!)F.average
for weighted average along a specified axis (#2377)reset
method to iterators to avoid copy of the iterator made by MultiprocessIterator
with spawn
or forkserver
mode multiprocessing (#2387)
MultiprocessIterator
and used by Evaluator
extension.get_device_from_id
and get_device_from_array
that functionally replace existing get_device
method and mark deprecated it (#2391)L.Resnet101Layers
and L.Resnet152Layers
with pretrained models (#2447)F.pad_sequence
. It takes different sizes of sequences and makes them a matrix by padding each sequence with given value and concatenating them (#2495)ignore_label
option to softmax_cross_entropy
function (#2499)In this release, we added cupy.fuse
decorator that fuses the fixed applications of supported functions on ndarrays. It can be used as follows (with a simple performance observation codes). The resulting NVIDIA visual profiler output is attached below.
import cupy
import cupy.prof
def f(x):
return x + x + x + x + x
# This decorator fuses the kernels into one.
@cupy.fuse()
def g(x):
return x + x + x + x + x
x = cupy.arange(40000000)
with cupy.prof.time_range('without fuse', color_id=0):
f(x)
with cupy.prof.time_range('with fuse', color_id=1):
g(x)
# You can pass numpy arrays transparently to the fused function as well.
# In this case, no JIT compilation is applied and it just falls back to plain NumPy API calls.
g(numpy.arange(40000000))
axis
option to count_nonzero
(#2296, Thanks @ShigekiKarita!)cupy.scatter_add
and cupy.ndarray.__getitem__
(#2393, thanks @yuyu2172!)Variable.cleargrad()
in optimizer hooks (#2389, #2390, thanks #Hakuyume!)cupy.cuda.Device
on backward unless cupy.ndarray
is used (#2394)LSTM
(#2502)axis
option of count_nonzero
when the NumPy version is under 1.12.0 (#2511)--frequency
option to MNIST example that sets the interval of taking a snapshot (#2217, thanks @johshisha!)SerialIterator
and MultiprocessIterator
interchangeably serialized/deserialized (#2361, thanks @Hakuyume!)cuda.Device
in Variable.backward
when CuPy is not used (#2395)StandardUpdater
(#2407)linear_interpolate
method instead of naive aritmetric operations in GRU function for more computational efficiency (#2497)F.leaky_relu
and F.relu
(#2399), F.sigmoid
and F.hard_sigmoid
(#2398), F.softplus
(#2401), and F.cast
(#2486)numpy_cupy_allclose
(#2433), type check (#2434), and time_range
(#2435)chainer.dataset.download
(#1388)PlotReport.available
(#2318)FutureWarning
in Travis CI (#2456)itruediv
when NumPy version is older than 1.10 (#2459)gradient_check.assert_allclose
by testing.assert_allclose
(#2463)test_goodness_of_fit
in CuPy because it sometimes fails (#2494)Published by beam2d over 7 years ago
This is the beta version of v2.0.0. See the list for the complete list of solved issues and merged PRs.
Try this v2 beta version by installing Chainer with the following command:
pip install chainer --pre
Note that --pre
option is mandatory to install v2 beta; otherwise v1 is installed. If you want to use CUDA/cuDNN, you also have to install cupy separately.
pip install cupy
Any feedback via issues/PRs/forums/etc. is appreciated!!!
We are planning the v2.0.0 release on May 16 (the schedule might be changed), and the final regular release of v1 is scheduled on May 9. Any PRs left after this final v1 update will not be merged, and at the release of v2.0.0 we will make the master
branch refer to the current _v2
branch. It will make the ongoing PRs conflicting with the new target.
If you are planning to send a new PR to Chainer, we strongly recommend to write your code on top of the _v2 branch and set the target branch to it. As for the ongoing PRs that are hard to meet the deadline of the final regular v1 update, it is also recommended to switch the target to v2 and start resolving any merge conflicts.
update_rule
attribute set by the optimizer. Users can edit the hyperparameter of each update rule to customize the optimization configuration for each parameter (e.g. using different learning rate). Each update rule can also have its own hook functions (e.g. for applying weight decay only to weight matrices).Variable
object is not a part of the computational graph anymore, and instead it holds a reference to VariableNode
object which is a part of the computational graph. Some Functions let the variable node not preserve the array buffer so that the memory consumption is reduced. In this release, only the most popular functions (relu
, arithemetics, concat
, split_axis
) support this feature.use_cudnn
mode (#2188)
use_cudnn
argument from many functions. Whether to use cuDNN is now configured by chainer.config.use_cudnn
.Variable
is now allowed to have an uninitialized data array. This change simplifies the handling of uninitialized parameters of links.Variable
class to share its actual data and gradient arrays across its copied instances including the initialized/uninitialized state (#2101)Evaluator
can accept (#1654)
chainer.training.extensions.Evaluator
. Now, this restriction is removed and arbitrary data types are allowed.chainer.init_weight
and chainer.initializers.init_weight
(#2465)chainer.functions
namespace (e.g. chainer.functions.Linear
), which had been left for backward compatibility . (#2330)chainer.functions.Parameter
(#2331)chainer.functions.caffe.CaffeFunction
, which had been left for backward compatibility (#2329)Variable.volatile
attribute (#2013, #2356)
chainer.no_backprop_mode
and chainer.force_backprop_mode
to control the construction of computational graphs instead.chainer.Flag
and its concrete instances (chainer.ON
, chainer.OFF
, and chainer.AUTO
) are also removed.chainer.initializer.get_fans
. Align the definition of fan_out
to other frameworks. (#1774) Thanks @dsanno!chainer.config.show
(#2335, #2336)setup.py
(#2275)chainer.config.train
to the tutorial (#2313)__len__
and shape
property directly without accessing data
property in some examples because arguments which a Link receives may be ndarray
(#2378)(Note: some features might be dropped in the actual releases)
chainer.config.deterministic
that detemines stochasticity of some chainer functions.Published by beam2d over 7 years ago
This is a minor release. See the list for the complete list of solved issues and merged PRs.
We have created two Slack teams (one for English speakers and the other for Japanese speakers) for quick communications related to Chainer. If you want to join, send a request for invitation via the following pages.
Chainer
F.fmod
: Differentiable elementwise mod function (#1617)test
argument to L.InceptionBN.__call__
(#1662, thanks @cympfh!)concat_examples
supports non-array objects (#2140)chainer.training.extensions.MicroAverage
: An extension that calculates the micro average precision (#2345)F.pad
: Differentiable padding function (#2253, thanks @KotaroSetoyama)chainer.Variable.transpose
(#2359, thanks @yuyu2172!)chainer.Variable.reshape
(#2236, Thanks @yuyu2172!)CuPy
cupy.prof.time_range
and cupy.prof.TimeRangeDecorator
:time_range
) and decorator (TimeRangeDecorator
) that uses NVTX to mark function calls with range in NVIDIA profiler (#2179, thanks @uchida!)cupy.scatter_add
supports indexing with multiple integer arrays (#2202, thanks @yuyu2172!)cupy.meshgrid
(#2274 Thanks @yuyu2172!)cupy.flip
and cupy.rot90
(#2350, thanks @tsurumeso!)cupy.matmul
supports all real types (#2151)matplotlib.use
from PlotReport
(#2266)ImportError
rather than RuntimeError
when attempting to import broken CuPy (#2307)epoch_detail
of MultiprocesseIterator
and SerialIterator
(#2327, thanks @Hakuyume)F.convolution_2d
when cuDNN v3 is used (#2355)VGG16Layers
(#2364)cupy.array
to not modify the original array when copy=False
and ndmin
are specified (#2396). It was reported at #2392 (Thanks @Signull8192!).cupy.ndarray.dot
when two input arrays are both 1-D (#2282)NStepLSTM
accepts None
for initial states to initialize them with zeroes (#2289)F.gaussian
supports zero-dimensional array (#2342)dtype
option for cupy.random in initializer (#2376)TheanoFunction
supports Theano>=0.9 by using OrderedDict
as known_grad
argument (#2403)crelu
, elu
, tanh
, broadcast
, broadcast_to
, and concat
to their docstrings (#2229, thanks @shiba24!)functions/normalization/batch_normalization.py
(#2268, thanks @crcrpar!)space2depth
and depth2space
to documents ( #2273, thanks @yuyu2172!)tips.rst
(#2304, thanks @soramichi!)test_sigmoid_cross_entropy
(#2324, thanks @Hakuyume!)F.Linear
instead of L.Linear
in the docstring of LSTM function #2333 (Thanks @dsanno!)F.hard_sigmoid
(#2374)test_matmul
(#2326)Published by beam2d over 7 years ago
This is the alpha version of v2.0.0. See the list for the complete list of solved issues and merged PRs.
Try this v2 alpha version by installing Chainer with the following command:
pip install chainer --pre
Note that --pre
option is mandatory to install v2 alpha; otherwise v1 is installed. If you want to use CUDA/cuDNN, you also have to install cupy separately.
pip install cupy
Any feedbacks via issues/PRs/forums/etc. are appreciated!!!
chainer.config
and chainer.global_config
objects. (#2145)
debug
mode (which had been configured by set_debug
)enable_backprop
mode (which had been configured by no_backprop_mode
)train
mode (which had been configured by train
or test
arguments of many methods)type_check
mode (which had been configured by Function.type_check_enable
)chainer.cuda
name space (chainer.cuda.empty
, chainer.cuda.empty_like
, chainer.cuda.zeros
, chainer.cuda.zeros_like
, chainer.cuda.ones
, chainer.cuda.ones_like
, chainer.cuda.full
, chainer.cuda.full_like
) (#2161)chainer.FunctionSet
(#2015, #2132)wscale
option of link implementations. Users are recommended to change the scale of the distribution from which initial weight values are drawn with Initializer
. (#2163)train
/ test
arguments of following methods/classes (#2186)
F.dropout
, F.n_step_lstm
, F.zoneout
,L.BatchNormalization
, L.CaffeFunction
, L.InceptionBN
, L.NStepLSTM
, L.ResNet50Layers
, L.StatefulZoneoutLSTM
, L.VGG16Layers
snapshot
and snapshot_object
: trigger
option is removed. Use the argument with the same name of Trainer.extend
instead. (#2017, #2204)Variable.__len__
: It returned the number of elements in the wrapped array in v1. But it was inconsistent with the ndarray of NumPy and CuPy, which returns the number of first dimension. In v2, the behavior of Variable.__len__
is aligned with ndarray’s. (#1792, #2153)Evaluator
extension: It now automatically switches to test mode during the evaluation.chainer.initializers.init_weight
: scale
option is removed (#2164)F.split_axis
: The default value of force_tuple
option is set to True
. With this change, users can assume the returned type of this function is a tuple by default. (#2022, #2187).chainer.config.train
to switch between training/test mode. In particular, some examples are simplified thanks to Evaluator
handling the mode automatically. (#2186)We are planning beta release in March. The following features are planned to be included in the future pre-releases (some may be included after the beta) of Chainer v2.
Optimizer
with UpdateRule
. It enables us to customize the hyperparameters (e.g. learning rate, whether to apply weight decay) for each parameter.use_cudnn
, deterministic
volatile
flag from Variable. The graph construction is then controlled by chainer.config.enable_backprop
flag.Published by unnonouno over 7 years ago
This is a minor release. See the list for the complete list of solved issues and merged PRs.
UnpoolingND
function (#1517)chainer.functions.fliplr
and chainer.functions.flipud
(#2239, #2249)marker
and grid
attribute to PlotReport(#2123)Trainer.extend
can accept lambda functions as an extension (#1930, thanks @soramichi)strict
option to HDF5Deserializer
and NpzDeserializer
(#2053, #2195)chainer.dataset.to_device
public (#2087)cupy.cumsum
without axis
argument support (#2235)cupy.ndarray.__setitem__
accept boolean arrays (#2099, thanks @yuyu2172)cupy.scatter_add
accept boolean arrays (#2175, thanks @yuyu2172)order
option to cupy.ndarray.copy (#2178, thanks @yuyu2172)cupy.ndarray.__setitem__
can accept multiple integer arrays (#2126, thanks @yuyu2172)cupy.random.distribution
can accept an array of float values as loc
and scale
argument (#2169)cupy.ndarray.__getitem__
support mask
whose shape is different from that of the array (#2201, thanks @yuyu2172)complete_slice
to fit numpy 1.12.0 (#2114)cupy.ndarray.shape.__set__
accept scalar values (#1969, #2129)cupy.ndarray.get
can work even if current device and the device array is located is not identical (#2141, #2142, thanks @yuyu2172)cupy.ndarray.get
can accept array with size 0 (#2172)Stream.done
and Event.done
(#2237)'i'
and 'I'
) of NumPy correctly (#2184)Variable.backward
correctly handle cudaErrorNoDevice
(#2245, thanks @niboshi)fixed_batch_normalization
(#2214)cupy.get_array_module
(#2162)cupy.concatenate
(#2144, #2242, #2233, #2248, #2251)asfortranarray
(#2176, thanks @yuyu2172)cupy.ndarray.device
(#2247)cupy.nadarray.__setitem__
(#2227)Variable.backward
(#2224)convolution_2d
function (#2192, thanks @fukutani)transpose_sequence
(#2212)cupy.ndarray.__getitem__
when inputs are integer arrays. (#2134, thanks @yuyu2172)cupy.ndarray.__getitem__
(#2174, thanks @yuyu2172)cupy.array_split
(#2165)cupy.asarray
and cupy.asanyarray
by calling cupy.array
implementation directly (#2225)cuda.get_array_module
can accept Variable (#2050)cupy.reshape
when input array is invalid (#2193, thanks @fukutani)SerialIterator
(#2160, #2234, thanks @LukasDrude)clipped_relu
and relu
, sigmoid
and linear
. (#2208, thanks @shiba24)fs
attribute from CaffeFunction
document (#2130, #2131)chainer.functions.sigmoid
function (#1907)chainer.functions.n_stem_lstm
to the document (#2039)cupy.scatter_add.at
(#2206, thanks @yuyu2172)chainer.functions.linear
(#2189, thanks @shiba24)for_orders
and for_CF_orders
decorator for unit tests (#2105, thanks @yuyu2172)Published by beam2d over 7 years ago
This is a hot-fix release for fixing the issue #2120 via the PR #2121 (thanks @owruby!). It affects users who use Trainer with non-standard optimizer names (e.g. multiple optimizers), including the official DCGAN example. We recommend all users who are using v1.20.0 to this version.
Published by mitmul almost 8 years ago
This is a minor release. See the list for the complete list of solved issues and merged PRs.
Published by beam2d almost 8 years ago
This is a minor release. See the list for the complete list of solved issues and merged PRs.
Easy-to-use pretrained model implementations for computer vision are added. VGG16 and ResNet50 are available. For example, you can load and use VGG16 as a feature extractor as follows.
from chainer.links import VGG16Layers
from PIL import Image
model = VGG16Layers()
img = Image.open("path/to/image.jpg")
feature = model.extract([img], layers=["fc7"])["fc7"]
Published by bkvogel almost 8 years ago
This is a minor release. See the list for the complete list of solved issues and merged PRs.
Evaluator
(#1737)deterministic
option into convolution_2d and deconvolution_2d (#1321)Evaluator
" (#1790)Published by beam2d about 8 years ago
This is a minor release. See here for the complete list of solved issues and merged PRs.
_thread_local.default_backprop
not found” in a multi-threaded case (#1705, #1708, thanks @Hiroshiba!)'Convolution2D' object has no attribute 'W'
(#1776 (#1691))Published by okuta about 8 years ago
This is a minor release. See the list for the complete list of solved issues and merged PRs.
no_backprop_mode
and force_backprop_mode
are added. In no_backprop_mode
context, Variables with volatile=’auto’ behave like non-volatile variables. And, in force_backprop_mode
context, they behave like volatile variables. (#1521)__init__
method (#1631 #1633)use_cudnn
flag to BatchNormalization (#1626)Published by beam2d about 8 years ago
This is a hot-fix release that fixes a build issue. If you have already installed Chainer 1.15.0 successfully, you do not have to install 1.15.0.1.
For those who failed to install Chainer 1.15.0, it is recommended to install Chainer from PyPI (pip install chainer
).
Published by delta2323 about 8 years ago
This is a minor release. See the list for the complete list of solved issues and merged PRs.
flags
attribute of cupy.ndarray (#1571)Published by unnonouno about 8 years ago
This is a minor release. See https://github.com/pfnet/chainer/milestone/29?closed=1 for the complete list of solved issues and merged PRs.
SLICE
layer (#1361, thanks @amitibo)