| 175 | @flow.unittest.skip_unless_1n1d() |
| 176 | def test_nested_module(test_case): |
| 177 | class CustomModule(flow.nn.Module): |
| 178 | def __init__(self): |
| 179 | super().__init__() |
| 180 | self.relu = flow.nn.ReLU() |
| 181 | |
| 182 | def forward(self, x): |
| 183 | return self.relu(x) |
| 184 | |
| 185 | m = CustomModule() |
| 186 | x = flow.Tensor(2, 3) |
no outgoing calls