ReformatPosition not working as expected
I have in my configuration file (in the dataset_transforms
section) :
- ReformatPosition:
distance: true
circular: true
chromosome_size: 2000000
normalized: false
The data on disk have a position vector normalized and in absolute value (not in distance).
I put a breakpoint() Line 734 in training.py, just after outputs = self.net(inputs)
Inspecting inputs reveals that the position vector is indeed in distance, but is not unnormalized :
(Pdb) inputs[0][0]
tensor([1.7991e-03, 5.5150e-04, 4.2860e-04, 6.7410e-04, 3.4620e-04, 5.7830e-04,
3.1670e-04, 3.5010e-04, 9.2000e-06, 3.4280e-04, 1.5740e-04, 6.2380e-04,
7.9220e-04, 2.9622e-03, 1.5797e-03, 4.5280e-04, 6.2810e-04, 4.4000e-03,
...
3.1140e-04, 2.3540e-04, 1.1370e-03, 1.1598e-03, 7.4090e-04, 3.2838e-03,
9.8550e-04, 3.0500e-05, 2.5351e-03, 1.1070e-03], device='cuda:0')
whereas the configuration has the correct parameters :
(Pdb) self.config["dataset_transforms"]
[{'ReformatPosition': {'distance': True, 'circular': True, 'chromosome_size': 2000000, 'normalized': False, 'initial_position': None}}, {'Crop': {'max_snp': 400, 'max_indiv': 50, 'keep_polymorphic_only': True}}]
We're going to look into that rapidly, but @embray if you could help on that, it would be great !