Before applying a scope we make sure that all external blob names are converted to blob reference. So further scoping doesn't affect them
(
self, input_t, seq_lengths, states, timestep, extra_inputs)
| 162 | return self.apply_override(model, *args) |
| 163 | |
| 164 | def _rectify_apply_inputs( |
| 165 | self, input_t, seq_lengths, states, timestep, extra_inputs): |
| 166 | ''' |
| 167 | Before applying a scope we make sure that all external blob names |
| 168 | are converted to blob reference. So further scoping doesn't affect them |
| 169 | ''' |
| 170 | |
| 171 | input_t, seq_lengths, timestep = _RectifyNames( |
| 172 | [input_t, seq_lengths, timestep]) |
| 173 | states = _RectifyNames(states) |
| 174 | if extra_inputs: |
| 175 | extra_input_names, extra_input_sizes = zip(*extra_inputs) |
| 176 | extra_inputs = _RectifyNames(extra_input_names) |
| 177 | extra_inputs = zip(extra_input_names, extra_input_sizes) |
| 178 | |
| 179 | arg_names = inspect.getargspec(self.apply_override).args |
| 180 | rectified = [input_t, seq_lengths, states, timestep] |
| 181 | if 'extra_inputs' in arg_names: |
| 182 | rectified.append(extra_inputs) |
| 183 | return rectified |
| 184 | |
| 185 | |
| 186 | def apply_override( |
no test coverage detected