I am trying to train a model using same config.py provided from the package but got the error shown below. Do you know what might have gone wrong? Thank you very much
0 -> *
1 -> 1
2 -> 2
3 -> 3
4 -> 4
5 -> A
6 -> C
7 -> D
8 -> E
9 -> F
10 -> G
11 -> H
12 -> I
13 -> K
14 -> L
15 -> M
16 -> N
17 -> P
18 -> Q
19 -> R
20 -> S
21 -> T
22 -> V
23 -> W
24 -> Y
number of aa: 25
note: using seq mode.
note: using >>>embedding<<< method.
DeepRT: using max length defined by user: 50
Read training data done; source: data/mod_train_2.txt
Note: didn't load val data.
Read testing data done; source: data/mod_test_2.txt
0 -> *
1 -> 1
2 -> 2
3 -> 3
4 -> 4
5 -> A
6 -> C
7 -> D
8 -> E
9 -> F
10 -> G
11 -> H
12 -> I
13 -> K
14 -> L
15 -> M
16 -> N
17 -> P
18 -> Q
19 -> R
20 -> S
21 -> T
22 -> V
23 -> W
24 -> Y
parameters: 2869764
0 -> *
1 -> 1
2 -> 2
3 -> 3
4 -> 4
5 -> A
6 -> C
7 -> D
8 -> E
9 -> F
10 -> G
11 -> H
12 -> I
13 -> K
14 -> L
15 -> M
16 -> N
17 -> P
18 -> Q
19 -> R
20 -> S
21 -> T
22 -> V
23 -> W
24 -> Y
number of aa: 25
note: using seq mode.
C:\Users\cct\AppData\Local\Continuum\anaconda3\lib\site-packages\torch\nn_reduction.py:46: UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead.
warnings.warn(warning.format(ret))
0%| | 0/192 [00:00<?, ?it/s]Traceback (most recent call last):
File "capsule_network_emb.py", line 738, in
engine.train(processor, get_rt_iterator(True), maxepoch=NUM_EPOCHS, optimizer=optimizer)
File "C:\Users\cct\AppData\Local\Continuum\anaconda3\lib\site-packages\torchnet\engine\engine.py", line 63, in train
state['optimizer'].step(closure)
File "C:\Users\cct\AppData\Local\Continuum\anaconda3\lib\site-packages\torch\optim\adam.py", line 58, in step
loss = closure()
File "C:\Users\cct\AppData\Local\Continuum\anaconda3\lib\site-packages\torchnet\engine\engine.py", line 56, in closure self.hook('on_forward', state)
File "C:\Users\cct\AppData\Local\Continuum\anaconda3\lib\site-packages\torchnet\engine\engine.py", line 31, in hook
self.hooksname
File "capsule_network_emb.py", line 575, in on_forward
meter_loss.add(state['loss'].data[0])
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python `number
I am trying to train a model using same config.py provided from the package but got the error shown below. Do you know what might have gone wrong? Thank you very much
parameters: 2869764
0 -> *
1 -> 1
2 -> 2
3 -> 3
4 -> 4
5 -> A
6 -> C
7 -> D
8 -> E
9 -> F
10 -> G
11 -> H
12 -> I
13 -> K
14 -> L
15 -> M
16 -> N
17 -> P
18 -> Q
19 -> R
20 -> S
21 -> T
22 -> V
23 -> W
24 -> Y
C:\Users\cct\AppData\Local\Continuum\anaconda3\lib\site-packages\torch\nn_reduction.py:46: UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead.
warnings.warn(warning.format(ret))
0%| | 0/192 [00:00<?, ?it/s]Traceback (most recent call last):
File "capsule_network_emb.py", line 738, in
engine.train(processor, get_rt_iterator(True), maxepoch=NUM_EPOCHS, optimizer=optimizer)
File "C:\Users\cct\AppData\Local\Continuum\anaconda3\lib\site-packages\torchnet\engine\engine.py", line 63, in train
state['optimizer'].step(closure)
File "C:\Users\cct\AppData\Local\Continuum\anaconda3\lib\site-packages\torch\optim\adam.py", line 58, in step
loss = closure()
File "C:\Users\cct\AppData\Local\Continuum\anaconda3\lib\site-packages\torchnet\engine\engine.py", line 56, in closure self.hook('on_forward', state)
File "C:\Users\cct\AppData\Local\Continuum\anaconda3\lib\site-packages\torchnet\engine\engine.py", line 31, in hook
self.hooksname
File "capsule_network_emb.py", line 575, in on_forward
meter_loss.add(state['loss'].data[0])
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python `number