| Conditions | 2 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | #!/usr/bin/env python |
||
| 13 | def __init__(self, tensor, test_tensor=None, dim=0): |
||
| 14 | """ |
||
| 15 | Create a tensor layer. |
||
| 16 | """ |
||
| 17 | super(NeuralVariable, self).__init__("const") |
||
| 18 | self.output_dim = dim |
||
| 19 | self.tensor = tensor |
||
| 20 | self.test_tensor = tensor if not test_tensor else test_tensor |
||
| 21 | self.initialize(0) |
||
| 22 | |||
| 50 |