Take the mean over all non-batch dimensions.
(x)
| 10 | return getattr(self, key) |
| 11 | |
| 12 | def mean_flat(x): |
| 13 | """ |
| 14 | Take the mean over all non-batch dimensions. |
| 15 | """ |
| 16 | return th.mean(x, dim=list(range(1, len(x.size())))) |
| 17 | |
| 18 | def log_state(state): |
| 19 | result = [] |