Closed he159ok closed 3 years ago
Instead of running the test_sg_net successfully, I have run the demo_image.py successfully, which give some examples about how to use the VinVL.
The pytorch==1.4
and the output of nvcc -V
>= 10.1 are both necessary, where mine output is 11.2. When I was pytorch==1.7, it fails by given invalid cuda error
like https://github.com/microsoft/scene_graph_benchmark/issues/13.
Besides, once you have rebuilt a new environment, you need to run below to clean and rebuild the setup file,
rm -r build
python setup.py build develop
We just made an upgrade to pytorch 1.7. You can try 1.7 now. Thanks
When I have installed your environment step by step by option 1 and then run the command for below,
There are several issues,
I do not find the code to load the pre_trained model parameters for "AttrRCNN". Though the command has a pre-trained model path, I do not find a concrete
torch.load()
code by debugging. Thus I wonder whether I need to add torch.load() by self when I run the above command.The "self.training" in "AttrRCNN" is extended from "torch.nn.modules.module.py", which is set as True by default. But in run the command to extract VinVL features by the beginning command, it seems that it should be False and I have to overwrite each init functions of AttrRCNN, its "self.rpn", and "self.roi_heads" as below,
Instead of applying Pytorch 1.4, I apply Pytorch 1.7, but it always gives running errors for several in-place operations, such as below codes in "bounding_box.py"
the error is as below,
I address them by setting "with torch.no_grad()", but it feels strange. If I have to fine-tune the model, then these bugs will come again by removing "with torch.no_grad()".