Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Set names of output Variables from PickableSequentialChain #815

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions chainercv/links/model/pickable_sequential_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def __call__(self, x):
h = x
for name in self.layer_names[:last_index + 1]:
h = self[name](h)
h.name = name
if name in pick:
layers[name] = h

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def check_call(self, x, expects):
for out, layer_name in zip(outs, pick):
self.assertIsInstance(out, chainer.Variable)
self.assertIsInstance(out.array, self.link.xp.ndarray)
self.assertEqual(out.name, layer_name)

out = to_cpu(out.array)
np.testing.assert_equal(out, to_cpu(expects[layer_name].array))
Expand Down