Giter Club home page Giter Club logo

Comments (8)

Jeff-Zilence avatar Jeff-Zilence commented on July 18, 2024

Sorry that it is behind schedule. I may not have enough time to clean it, but it should be released by this weekend.

from transgeo2022.

snowface3 avatar snowface3 commented on July 18, 2024

Thank you. Looking forward to it.

from transgeo2022.

Jeff-Zilence avatar Jeff-Zilence commented on July 18, 2024

The code is out. You may check if there is any bug. Currently it is not very clean, but should be runnable.

from transgeo2022.

snowface3 avatar snowface3 commented on July 18, 2024

Hi, Thanks for releasing the code. I am starting to set it up on my machine. I get the following error when loading deit from pre-trained weights. Is it a bug?

_Traceback (most recent call last):

File "/conda/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 59, in wrap
fn(i, *args)
File "/workspace/TransGeo2022/train.py", line 218, in main_worker
model = TransGeo(args=args)
File "/workspace/TransGeo2022/model/TransGeo.py", line 43, in init
self.query_net = base_model(crop=False, img_size=self.size_grd, num_classes=args.dim)
File "/workspace/TransGeo2022/model/Deit.py", line 160, in deit_small_distilled_patch16_224
new_matrix = resize(matrix).permute(0, 2, 3, 1).reshape([1, -1, weight.shape[-1]])
File "/conda/lib/python3.8/site-packages/torchvision/transforms/transforms.py", line 195, in call
return F.resize(img, self.size, self.interpolation)
File "/conda/lib/python3.8/site-packages/torchvision/transforms/functional.py", line 229, in resize
raise TypeError('img should be PIL Image. Got {}'.format(type(img)))
TypeError: img should be PIL Image. Got <class 'torch.Tensor'>

Btw, I could run the code on 1 gpu by not using pretrained deit weights.

from transgeo2022.

Jeff-Zilence avatar Jeff-Zilence commented on July 18, 2024

What is the version of your torchvision and pytorch? Could you upgrade them and try again?

from transgeo2022.

Jeff-Zilence avatar Jeff-Zilence commented on July 18, 2024

https://pytorch.org/vision/main/generated/torchvision.transforms.Resize.html
The resize function should support both PIL and tensor as input, and it works for torchvision==0.11.1+cu113

from transgeo2022.

Jeff-Zilence avatar Jeff-Zilence commented on July 18, 2024

Thank you for your interest. Let me know if you are able to run it.

from transgeo2022.

snowface3 avatar snowface3 commented on July 18, 2024

Thanks. Upgrading torchvision helped. I am able to run the code. Appreciate the help!

from transgeo2022.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.