Could you please provide the requirements.txt
Humbertzhang opened this issue · 1 comments
Humbertzhang commented
Hey, I recently want to train the model, after i prepared the data and copy it to the data
folder, i meet some problems.
When i run:
python train.py --data_path=data --file_name='trained_model
I got the output like that:
E:\StageNet\ai\StageNet>python train.py --data_path=data --file_name='trained_model
train.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Preparing training data ...
Constructing model ...
available device: cuda:0
Start training ...
Chunk 0, Batch 0: Loss = 0.6755
==>Predicting on validation
Valid loss = 0.5794
confusion matrix:
[[66]]
Traceback (most recent call last):
File "train.py", line 280, in <module>
ret = metrics.print_metrics_binary(valid_true, valid_pred)
File "E:\StageNet\ai\StageNet\utils\metrics.py", line 21, in print_metrics_binary
acc = (cf[0][0] + cf[1][1]) / np.sum(cf)
IndexError: index 1 is out of bounds for axis 0 with size 1
I wonder if it's because I'm using the wrong version of the library, I would like to ask whether requirements.txt can be provided
v1xerunt commented
The code can run on numpy 1.19.2, python 3.7.6, torch 1.2.0