D:\Benni\Code\DeepRT\DeepRTplus>python capsule_network_emb_cpu.py
0 -> *
1 -> 1
2 -> 2
3 -> A
4 -> D
5 -> E
6 -> F
7 -> G
8 -> H
9 -> I
10 -> K
11 -> L
12 -> M
13 -> N
14 -> P
15 -> Q
16 -> R
17 -> S
18 -> T
19 -> V
20 -> W
21 -> Y
>> number of aa: 22
>> note: using seq mode.
>> note: using >>>embedding<<< method.
DeepRT: using max length defined by user: 50
Read training data done; source: data/MapAlignerIdentificationuRTdata_train_2.tx
t
Note: didn't load val data.
Read testing data done; source: data/MapAlignerIdentificationuRTdata_test_2.txt
0 -> *
1 -> 1
2 -> 2
3 -> A
4 -> D
5 -> E
6 -> F
7 -> G
8 -> H
9 -> I
10 -> K
11 -> L
12 -> M
13 -> N
14 -> P
15 -> Q
16 -> R
17 -> S
18 -> T
19 -> V
20 -> W
21 -> Y
# parameters: 2869704
D:\Programs\anaconda3\lib\site-packages\torch\nn\functional.py:52: UserWarning:
size_average and reduce args will be deprecated, please use reduction='sum' inst
ead.
warnings.warn(warning.format(ret))
0%| | 0/115 [00:00<?, ?it/s]0
-> *
1 -> 1
2 -> 2
3 -> A
4 -> D
5 -> E
6 -> F
7 -> G
8 -> H
9 -> I
10 -> K
11 -> L
12 -> M
13 -> N
14 -> P
15 -> Q
16 -> R
17 -> S
18 -> T
19 -> V
20 -> W
21 -> Y
>> number of aa: 22
>> note: using seq mode.
capsule_network_emb_cpu.py:575: UserWarning: invalid index of a 0-dim tensor. Th
is will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor
to a Python number
meter_loss.add(state['loss'].data[0])
100%|████████████████████████████████████████| 115/115 [06:23<00:00, 3.34s/it]
[Epoch 1] Training Loss: 0.0968 (MSE: 7.0000)
0 -> *
1 -> 1
2 -> 2
3 -> A
4 -> D
5 -> E
6 -> F
7 -> G
8 -> H
9 -> I
10 -> K
11 -> L
12 -> M
13 -> N
14 -> P
15 -> Q
16 -> R
17 -> S
18 -> T
19 -> V
20 -> W
21 -> Y
>> number of aa: 22
>> note: using seq mode.
[Epoch 1] Testing Loss: 0.0679 (MSE: 7.0000)
Traceback (most recent call last):
File "capsule_network_emb_cpu.py", line 743, in <module>
engine.train(processor, get_rt_iterator(True), maxepoch=NUM_EPOCHS, optimize
r=optimizer)
File "D:\Programs\anaconda3\lib\site-packages\torchnet\engine\engine.py", line
67, in train
self.hook('on_end_epoch', state)
File "D:\Programs\anaconda3\lib\site-packages\torchnet\engine\engine.py", line
31, in hook
self.hooks[name](state)
File "capsule_network_emb_cpu.py", line 671, in on_end_epoch
pred_batch = model(test_batch)
File "D:\Programs\anaconda3\lib\site-packages\torch\nn\modules\module.py", lin
e 477, in __call__
result = self.forward(*input, **kwargs)
File "capsule_network_emb_cpu.py", line 257, in forward
x = x.transpose(dim0=1, dim1=2) # -> [batch, dict, len]
RuntimeError: Dimension out of range (expected to be in range of [-1, 0], but go
t 1)
I used a dataset with modifications encoded as "1" and "2".
data.txt
And the same data with all modified peptides removed.
data_no_mods.txt
With the modified peptides, I got this error: