internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: chainer/chainer

Issue:
CTC fails at multi-GPU usage
https://github.com/pfnet/chainer/blob/master/chainer/functions/loss/ctc.py#L301 This part calls cupy functions directly at the outside of Function call, where the current device is not appropriately switched. It causes device mismatch errors on calling CTC for inputs on a device which is not current.



Discussion:

Resolving patch:
diff --git a/chainer/functions/loss/ctc.py b/chainer/functions/loss/ctc.py
--- a/chainer/functions/loss/ctc.py
+++ b/chainer/functions/loss/ctc.py
@@ -192,15 +192,27 @@ def calc_trans(self, path, yseq, xp):
     def forward(self, inputs):
         xp = cuda.get_array_module(inputs[0])
         self.input_length = inputs[0]
+        label_length = inputs[1]
+        t = inputs[2]
+        xs = inputs[3:]
 
-        # The length of path is (2 * label_length + 1)
-        self.path_length = 2 * inputs[1] + 1
+        if chainer.is_debug():
+            # Batch size check.
+            assert len(xs[0]) == len(t)
+            assert len(xs[0]) == len(self.input_length)
+            assert len(xs[0]) == len(label_length)
 
-        batch_size = len(inputs[2])
-        yseq_shape = (len(inputs) - 3,) + inputs[3].shape
-        self.yseq = _softmax(xp.vstack(inputs[3::]).reshape(yseq_shape), xp)
+            # Length check.
+            assert len(xs) >= xp.max(self.input_length)
+            assert len(t[0]) >= xp.max(label_length)
+
+        self.path_length = 2 * label_length + 1
+
+        batch_size = len(t)
+        yseq_shape = (len(xs),) + xs[0].shape
+        self.yseq = _softmax(xp.vstack(xs).reshape(yseq_shape), xp)
         log_yseq = self.log_matrix(self.yseq, xp)
-        self.path = _label_to_path(inputs[2], self.blank_symbol, xp)
+        self.path = _label_to_path(t, self.blank_symbol, xp)
         self.prob_trans = self.calc_trans(self.path, log_yseq, xp)
 
         loss = utils.force_array(xp.sum(
@@ -293,14 +305,5 @@ def connectionist_temporal_classification(
             xp.full((len(t.data),), len(t.data[0]), dtype=numpy.int32),
             volatile='auto')
 
-    # Batch size check.
-    assert len(x[0].data) == len(t.data)
-    assert len(x[0].data) == len(input_length.data)
-    assert len(x[0].data) == len(label_length.data)
-
-    # Length check.
-    assert len(x) >= max(input_length.data)
-    assert len(t.data[0]) >= max(label_length.data)
-
     return ConnectionistTemporalClassification(blank_symbol)(
         input_length, label_length, t, *x)


Test patch:
Repository: chainer/chainer

Issue:
Build error on windows7
I use windows 7 (64 bit), Anaconda 4.1.11 & Microsoft Visual C++ Compiler for Python 2.7.
When I build latest commit or release 1.14.0, I met below fail.

> ...
> running build_ext
> Executing cythonize
> Options: {'profile': False, 'annotate': False, 'linetrace': False, 'no_cuda': False}
> Traceback (most recent call last):
>   File "setup.py", line 94, in <module>
>     'build_ext': chainer_setup_build.chainer_build_ext,
>   File "C:\Anaconda2\envs\chainer_test\lib\distutils\core.py", line 151, in setup
>     dist.run_commands()
>   File "C:\Anaconda2\envs\chainer_test\lib\distutils\dist.py", line 953, in run_commands
>     self.run_command(cmd)
>   File "C:\Anaconda2\envs\chainer_test\lib\distutils\dist.py", line 972, in run_command
>     cmd_obj.run()
>   File "C:\Anaconda2\envs\chainer_test\lib\distutils\command\build.py", line 127, in run
>     self.run_command(cmd_name)
>   File "C:\Anaconda2\envs\chainer_test\lib\distutils\cmd.py", line 326, in run_command
>     self.distribution.run_command(command)
>   File "C:\Anaconda2\envs\chainer_test\lib\distutils\dist.py", line 971, in run_command
>     cmd_obj.ensure_finalized()
>   File "C:\Anaconda2\envs\chainer_test\lib\distutils\cmd.py", line 109, in ensure_finalized
>     self.finalize_options()
>   File "D:\Unpack\chainer-master_20160826\chainer-master\chainer_setup_build.py", line 281, in finalize_options
>     distutils.sysconfig.customize_compiler(compiler)
>   File "C:\Anaconda2\envs\chainer_test\lib\distutils\sysconfig.py", line 196, in customize_compiler
>     cpp = cc + " -E"           # not always
> TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

I avoided error by modifying below. 
I think this is a bug of "chainer_setup_build.py". Line 280, in function: finalize_options
`compiler = distutils.ccompiler.new_compiler(self.compiler)`
-> `compiler = distutils.ccompiler.new_compiler(compiler=self.compiler)`

Please confirm detail and I expect modifying.



Discussion:
Oh, as you say the first argument of `new_compiler` is not `complier`, but `plat`. 

```
def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0)
```

It maybe a bug. I'll fix it.


Resolving patch:
diff --git a/chainer_setup_build.py b/chainer_setup_build.py
--- a/chainer_setup_build.py
+++ b/chainer_setup_build.py
@@ -277,7 +277,7 @@ def finalize_options(self):
             cythonize_options = {
                 key: _arg_options[key] for key in cythonize_option_keys}
 
-            compiler = distutils.ccompiler.new_compiler(self.compiler)
+            compiler = distutils.ccompiler.new_compiler(compiler=self.compiler)
             distutils.sysconfig.customize_compiler(compiler)
 
             extensions = make_extensions(_arg_options, compiler)


Test patch:
Repository: chainer/chainer

Issue:
Add chainer.functions.abs
Current `Variable` requires `chainer.functions.sum` for the sum function but builtin `abs` for the absolute function. Builtin `sum` should not be used for a `Variable` and there is no `abs` in `chainer.functions`.



Discussion:

Resolving patch:
diff --git a/chainer/functions/__init__.py b/chainer/functions/__init__.py
--- a/chainer/functions/__init__.py
+++ b/chainer/functions/__init__.py
@@ -61,7 +61,7 @@
 from chainer.functions.loss import softmax_cross_entropy
 from chainer.functions.loss import triplet
 from chainer.functions.loss import vae  # NOQA
-from chainer.functions.math import basic_math  # NOQA
+from chainer.functions.math import basic_math
 from chainer.functions.math import batch_l2_norm_squared
 from chainer.functions.math import bias
 from chainer.functions.math import ceil
@@ -227,6 +227,7 @@
 triplet = triplet.triplet
 vstack = vstack.vstack
 
+absolute = basic_math.absolute
 ArgMax = minmax.ArgMax
 argmax = minmax.argmax
 ArgMin = minmax.ArgMin


Test patch:
Repository: chainer/chainer

Issue:
The problem of numpy.sqrt for float16 is now resolved
I found this problem was solved in numpy 1.11.2.
We need to obey the latest and to fix tests to ignore older versions.

https://github.com/numpy/numpy/issues/7897



Discussion:

Resolving patch:
diff --git a/cupy/math/misc.py b/cupy/math/misc.py
--- a/cupy/math/misc.py
+++ b/cupy/math/misc.py
@@ -26,25 +26,9 @@ def clip(a, a_min, a_max, out=None):
     return a.clip(a_min, a_max, out=out)
 
 
-sqrt = core.create_ufunc(
-    'cupy_sqrt',
-    # I think this order is a bug of NumPy, though we select this "buggy"
-    # behavior for compatibility with NumPy.
-    ('f->f', 'd->d', 'e->e'),
-    'out0 = sqrt(in0)',
-    doc='''Elementwise positive square-root function.
-
-    .. note::
-       This ufunc outputs float32 arrays for float16 arrays input by default as
-       well as NumPy 1.9. If you want to override this behavior, specify the
-       dtype argument explicitly, or use ``cupy.math.misc.sqrt_fixed`` instead.
-
-    .. seealso:: :data:`numpy.sqrt`
-
-    ''')
-
-
-sqrt_fixed = core.sqrt_fixed
+# sqrt_fixed is deprecated.
+# numpy.sqrt is fixed in numpy 1.11.2.
+sqrt = sqrt_fixed = core.sqrt
 
 
 square = core.create_ufunc(


Test patch:
diff --git a/tests/cupy_tests/math_tests/test_misc.py b/tests/cupy_tests/math_tests/test_misc.py
--- a/tests/cupy_tests/math_tests/test_misc.py
+++ b/tests/cupy_tests/math_tests/test_misc.py
@@ -64,7 +64,9 @@ def test_clip2(self, xp, dtype):
         a_max = xp.array([[10], [9], [8]], dtype=dtype)
         return a.clip(a_min, a_max)
 
+    @testing.with_requires('numpy>=1.11.2')
     def test_sqrt(self):
+        # numpy.sqrt is broken in numpy<1.11.2
         self.check_unary('sqrt')
 
     def test_square(self):
Repository: chainer/chainer

Issue:
Build failed on Mac
I cannot build Chainer on mac after #1775 is merged.

```
% python setup.py develop
Options: {'profile': False, 'annotate': False, 'linetrace': False, 'no_cuda': False}
Traceback (most recent call last):
  File "setup.py", line 17, in <module>
    ext_modules = chainer_setup_build.get_ext_modules()
  File "/Users/unno/git/chainer/chainer_setup_build.py", line 219, in get_ext_modules
    sysconfig.customize_compiler(compiler)
  File "/Users/unno/.pyenv/versions/2.7.8/lib/python2.7/distutils/sysconfig.py", line 168, in customize_compiler
    if not _config_vars.get('CUSTOMIZED_OSX_COMPILER', ''):
AttributeError: 'NoneType' object has no attribute 'get'
```

I investigated distutils. It initializes `_config_var` variables as `None` and when a user calls `get_config_vars` this variable is initialized.
BTW, I think we need to use ccompiler in `build_ext` because this option has many command line options for compiler flags.


Discussion:

Resolving patch:
diff --git a/chainer_setup_build.py b/chainer_setup_build.py
--- a/chainer_setup_build.py
+++ b/chainer_setup_build.py
@@ -214,6 +214,9 @@ def get_ext_modules():
     arg_options = parse_args()
     print('Options:', arg_options)
 
+    # We need to call get_config_vars to initialize _config_vars in distutils
+    # see #1849
+    sysconfig.get_config_vars()
     compiler = ccompiler.new_compiler()
     sysconfig.customize_compiler(compiler)
 


Test patch:
Repository: chainer/chainer

Issue:
Readable stack trace in type-check
In Function._check_data_type_forward, it re-raises a new exception object for a detailed error message. Instead it hides the original stack-trace. It is useless for users to know details of type error.


Discussion:

Resolving patch:
diff --git a/chainer/function.py b/chainer/function.py
--- a/chainer/function.py
+++ b/chainer/function.py
@@ -269,15 +269,8 @@ def stack(self):
 
     def _check_data_type_forward(self, in_data):
         in_type = type_check.get_types(in_data, 'in_types', False)
-        try:
+        with type_check.get_function_check_context(self):
             self.check_type_forward(in_type)
-        except type_check.InvalidType as e:
-            msg = """
-Invalid operation is performed in: {0} (Forward)
-
-{1}""".format(self.label, str(e))
-            six.raise_from(
-                type_check.InvalidType(e.expect, e.actual, msg=msg), None)
 
     def check_type_forward(self, in_types):
         """Checks types of input data before forward propagation.
diff --git a/chainer/utils/type_check.py b/chainer/utils/type_check.py
--- a/chainer/utils/type_check.py
+++ b/chainer/utils/type_check.py
@@ -1,11 +1,24 @@
+import contextlib
 import operator
 import sys
+import threading
 
 import numpy
 
 from chainer import cuda
 
 
+_thread_local = threading.local()
+
+
+@contextlib.contextmanager
+def get_function_check_context(f):
+    default = getattr(_thread_local, 'current_function', None)
+    _thread_local.current_function = f
+    yield
+    _thread_local.current_function = default
+
+
 class TypeInfo(object):
 
     """Type information of an input/gradient array.
@@ -444,6 +457,13 @@ class InvalidType(Exception):
     def __init__(self, expect, actual, msg=None):
         if msg is None:
             msg = 'Expect: {0}\nActual: {1}'.format(expect, actual)
+            if (hasattr(_thread_local, 'current_function')
+                    and _thread_local.current_function is not None):
+                msg = '''
+Invalid operation is performed in: {0} (Forward)
+
+{1}'''.format(_thread_local.current_function.label, msg)
+
         super(InvalidType, self).__init__(msg)
 
         self.expect = expect


Test patch:
Repository: chainer/chainer

Issue:
Can not import chainer.functions.PReLU on 1.19.0
I can not import PReLU from chainer.functions on 1.19.0.

In https://github.com/pfnet/chainer/blob/master/chainer/functions/__init__.py,
the corresponding lines are comment-outed.
 
```
# Import for backward compatibility
# om chainer.links.activation.prelu import PReLU  # NOQA
```

Is there a reason?


Discussion:
Oh, sorry. This is a mistake.

Resolving patch:
diff --git a/chainer/functions/__init__.py b/chainer/functions/__init__.py
--- a/chainer/functions/__init__.py
+++ b/chainer/functions/__init__.py
@@ -355,7 +355,7 @@
 from chainer.functions.util.forget import Forget  # NOQA
 
 # Import for backward compatibility
-# om chainer.links.activation.prelu import PReLU  # NOQA
+from chainer.links.activation.prelu import PReLU  # NOQA
 
 from chainer.links.connection.bilinear import Bilinear  # NOQA
 from chainer.links.connection.convolution_2d import Convolution2D  # NOQA


Test patch:
Repository: chainer/chainer

Issue:
`fs` attribute of CaffeFunction is missing 
`CaffeFunction` should have `fs` attribute which is a `FunctionSet` that has a set of layers, according to its [document](https://github.com/pfnet/chainer/blob/master/chainer/links/caffe/caffe_function.py#L121). But it is missing. I think we should treat it as a document bug because (1) `forwards` attribute essentially same information and (2) `FunctionSet` is not used any longer.


Discussion:

Resolving patch:
diff --git a/chainer/links/caffe/caffe_function.py b/chainer/links/caffe/caffe_function.py
--- a/chainer/links/caffe/caffe_function.py
+++ b/chainer/links/caffe/caffe_function.py
@@ -118,9 +118,6 @@ class CaffeFunction(link.Chain):
         model_path (str): Path to the binary-proto model file of Caffe.
 
     Attributes:
-        fs (FunctionSet): A set of functions corresponding to parameterized
-            layers of Caffe. The names of its attributes are same as the layer
-            names of the given network.
         forwards (dict): A mapping from layer names to corresponding functions.
 
     """


Test patch:
Repository: chainer/chainer

Issue:
Stop using ABC in Serializer
AbstractSerializer is currently written as an abstract base class. I don't think it is needed to support ABC.


Discussion:

Resolving patch:
diff --git a/chainer/serializer.py b/chainer/serializer.py
--- a/chainer/serializer.py
+++ b/chainer/serializer.py
@@ -1,14 +1,7 @@
-import abc
-
-import six
-
-
-@six.add_metaclass(abc.ABCMeta)
 class AbstractSerializer(object):
 
     """Abstract base class of all serializers and deserializers."""
 
-    @abc.abstractmethod
     def __getitem__(self, key):
         """Gets a child serializer.
 
@@ -21,7 +14,6 @@ def __getitem__(self, key):
         """
         raise NotImplementedError
 
-    @abc.abstractmethod
     def __call__(self, key, value):
         """Serializes or deserializes a value by given name.
 


Test patch:
Repository: chainer/chainer

Issue:
Make force_tuple True by default in split_axis
F.split_axis has an option `force_tuple`, which is set to False by default. In many cases, one wants to assume that the return type of this function is always tuple, which requires explicitly setting `force_tuple=True`. The default behavior has the inconsistent return types (Variable for one output and Tuple[Variable] for multiple outputs). I want to make the default value of this option True so that it consistently returns a tuple of variables by default.

This is based on the original request by @jekbradbury (https://gist.github.com/beam2d/f7b817c3ce6ada32a1f9c8cc7dea4a5a#gistcomment-1932338).


Discussion:

Resolving patch:
diff --git a/chainer/functions/array/split_axis.py b/chainer/functions/array/split_axis.py
--- a/chainer/functions/array/split_axis.py
+++ b/chainer/functions/array/split_axis.py
@@ -62,7 +62,7 @@ def backward(self, x, gys):
             return xp.concatenate(gys, axis=self.axis),
 
 
-def split_axis(x, indices_or_sections, axis, force_tuple=False):
+def split_axis(x, indices_or_sections, axis, force_tuple=True):
     """Splits given variables along an axis.
 
     Args:
@@ -72,8 +72,10 @@ def split_axis(x, indices_or_sections, axis, force_tuple=False):
             If it is a 1-D array of sorted integers, it
             indicates the positions where the array is split.
         axis (int): Axis that the input array is split along.
-        force_tuple (bool): If ``True``, this method returns a tuple even when
-            the number of outputs is one.
+        force_tuple (bool): If ``True`` (the default) this method returns a
+            tuple even when the number of outputs is one. Otherwise, if
+            ``False`` a Variable will be returned when the number of outputs
+             is one.
 
     Returns:
         tuple or Variable: Tuple of :class:`~chainer.Variable` objects


Test patch:
diff --git a/tests/chainer_tests/functions_tests/array_tests/test_split_axis.py b/tests/chainer_tests/functions_tests/array_tests/test_split_axis.py
--- a/tests/chainer_tests/functions_tests/array_tests/test_split_axis.py
+++ b/tests/chainer_tests/functions_tests/array_tests/test_split_axis.py
@@ -131,7 +131,7 @@ def test_forward_force_tuple_gpu(self):
 
     def check_forward_single(self, x_data, axis):
         x = chainer.Variable(x_data)
-        ys = functions.split_axis(x, 1, axis)
+        ys = functions.split_axis(x, 1, axis, force_tuple=False)
         self.assertIsInstance(ys, chainer.Variable)
 
     def test_forward_single_cpu(self):
Repository: chainer/chainer

Issue:
eps is a redundant argument of fixed_batch_normalization
`eps` is used only when `BatchNormalization.forward` is called with three arguments. So `fixed_batch_normalization` does not need `eps` because it calls forward propagation with five arguments.



Discussion:
See the comment of #2149. `fixed_batch_normalization` should add `eps` to the accumulated variance, so it should be fixed in a different way: do not remove `eps` argument and actually use it instead.

Resolving patch:
diff --git a/chainer/functions/normalization/batch_normalization.py b/chainer/functions/normalization/batch_normalization.py
--- a/chainer/functions/normalization/batch_normalization.py
+++ b/chainer/functions/normalization/batch_normalization.py
@@ -163,7 +163,7 @@ def forward(self, inputs):
                 var += self.eps
             else:
                 mean = self.fixed_mean
-                var = self.fixed_var
+                var = self.fixed_var + self.eps
             self.std = xp.sqrt(var, dtype=var.dtype)
             if xp is numpy:
                 self.x_hat = _xhat(x, mean, self.std, expander)


Test patch:
Repository: chainer/chainer

Issue:
Wrong behavior of SerialIterator if dataset is numpy array.
In `serial_iterator.py` lines [66](https://github.com/pfnet/chainer/blob/master/chainer/iterators/serial_iterator.py#L66) and [68](https://github.com/pfnet/chainer/blob/master/chainer/iterators/serial_iterator.py#L68) contain `+=` to extend lists.

Unfortunately, this does not crash for `numpy` arrays but produces undesired behavior. The dataset itself gets modified (see for `6` in the second example):

```
import numpy as np
from chainer.iterators.serial_iterator import SerialIterator

dataset = [1, 2, 3, 4, 5]
it = SerialIterator(dataset, batch_size=2, shuffle=False)

for _ in range(6):
    example = it.next()
    print(example)
```

```
[1, 2]
[3, 4]
[5, 1]
[2, 3]
[4, 5]
[1, 2]
```

```
dataset = np.asarray([1, 2, 3, 4, 5])
it = SerialIterator(dataset, batch_size=2, shuffle=False)

for _ in range(6):
    example = it.next()
    print(example)
```

```
[1 2]
[3 4]
[6]
[2 3]
[4 6]
[1 2]
```

When the two lines get changed to
```
batch.extend(list(self.dataset[:rest]))
```

and
```
batch.extend([self.dataset[index] for index in self._order[:rest]])
```

a useful error is raised.


Discussion:
Thank you for reporting problem. I'll make a patch.
BTW, I feel that we need to support numpy array as dataset.

Resolving patch:
diff --git a/chainer/iterators/serial_iterator.py b/chainer/iterators/serial_iterator.py
--- a/chainer/iterators/serial_iterator.py
+++ b/chainer/iterators/serial_iterator.py
@@ -63,10 +63,10 @@ def __next__(self):
                     numpy.random.shuffle(self._order)
                 if rest > 0:
                     if self._order is None:
-                        batch += list(self.dataset[:rest])
+                        batch.extend(self.dataset[:rest])
                     else:
-                        batch += [self.dataset[index]
-                                  for index in self._order[:rest]]
+                        batch.extend([self.dataset[index]
+                                      for index in self._order[:rest]])
                 self.current_position = rest
             else:
                 self.current_position = N


Test patch:
Repository: chainer/chainer

Issue:
matplotlib.use('Agg') conflicts with user code
In this line in `chainer/chainer/training/extensions/plot_report.py` the `matplotlib` backend is changed [Source](https://github.com/pfnet/chainer/blob/master/chainer/training/extensions/plot_report.py#L16):

    matplotlib.use('Agg')

Unfortunately, this can interfere with users code. For example, when the user sets the backend himself anywhere, it is not known, whether his setting or the Chainer settings wins (is imported first).

The `plot_report` gets imported, when `extensions` is imported. For now, I just removed from the corresponding `__init__` file locally, which is definitely not a clean solution.


Discussion:
I have a same problem, and running `matplotlib.use('XXX')` in module seems not good idea.
Hi, thank you for reporting the problem. I agree with removing `matplotlib.use` from PlotReport.

By the way, I found another problem. Once `matplotlib.pyplot` is imported, as we do in PlotReport, any call of `matplotlib.use` does not take effect. So import of `PlotReport` can disable user's call of `use()` function. See the [document of matplotlib](http://matplotlib.org/faq/usage_faq.html#what-is-a-backend) for detail.

There are several choice: (1) give up `matplotlib.pyplot` (2) write explicitly that PlotReport imports pyplot and `use()` will take no effect once it is imported. 

Resolving patch:
diff --git a/chainer/training/extensions/plot_report.py b/chainer/training/extensions/plot_report.py
--- a/chainer/training/extensions/plot_report.py
+++ b/chainer/training/extensions/plot_report.py
@@ -11,9 +11,6 @@
 import chainer.training.trigger as trigger_module
 
 try:
-    import matplotlib
-
-    matplotlib.use('Agg')
     from matplotlib import pyplot as plot
 
     _available = True
@@ -50,6 +47,25 @@ class PlotReport(extension.Extension):
     It also adds ``'epoch'`` and ``'iteration'`` entries to each result
     dictionary, which are the epoch and iteration counts at the output.
 
+    .. warning::
+
+        If your environment needs to specify a backend of matplotlib
+        explicitly, please call ``matplotlib.use`` before importing Chainer.
+        For example:
+
+        .. code-block:: python
+
+            import matplotlib
+            matplotlib.use('Agg')
+
+            import chainer
+
+        Then, once ``chainer.training.extensions`` is imported,
+        ``matplotlib.use`` will have no effect.
+
+    For the details, please see here:
+    http://matplotlib.org/faq/usage_faq.html#what-is-a-backend
+
     Args:
         y_keys (iterable of strs): Keys of values regarded as y. If this is
             None, nothing is output to the graph.


Test patch:
Repository: chainer/chainer

Issue:
Remove chainer.functions.caffe.CaffeFunction
This is left for backward compatibility.


Discussion:

Resolving patch:
diff --git a/chainer/functions/caffe/__init__.py b/chainer/functions/caffe/__init__.py
deleted file mode 100644
--- a/chainer/functions/caffe/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from chainer.links.caffe import caffe_function
-
-
-# for backward compatibility
-CaffeFunction = caffe_function.CaffeFunction
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,6 @@
               'chainer.functions',
               'chainer.functions.activation',
               'chainer.functions.array',
-              'chainer.functions.caffe',
               'chainer.functions.connection',
               'chainer.functions.evaluation',
               'chainer.functions.loss',


Test patch: