Giter VIP home page Giter VIP logo

Comments (5)

aboulch avatar aboulch commented on July 25, 2024

Hello,
The input_pts are the point coordinates of input point cloud => pos in your case. The format is [Batch size, Dim, NPoints]
The features are inputs_fts or x, depending on the example => y in your case.

from lightconvpoint.

shangguan9191 avatar shangguan9191 commented on July 25, 2024

in your model for classification task,
there is def forward(self, x, input_pts):.

I write my train model like
`def train(epoch):
model.train()

for data in train_loader:
    data = data.to(device)
    optimizer.zero_grad()
    loss = F.nll_loss(model(data.x, data.pos), data.y)
    loss.backward()
    optimizer.step()`

i simply injected your network for classification for my model, However, it did not work. i am wondering if there is no data.x in Data(pos=[10240, 3], y=[1]) .

What would you suggest a proper way to implement ConvPoint classification for your own dataset like I mentioned.

from lightconvpoint.

aboulch avatar aboulch commented on July 25, 2024

You need to reshape the data to fit input_pts.shape = [BatchSize, Dim, NPoints] and x.shape = [BatchSize, C, NPoints]
For example with a batchsize=1 and x=1 you can do:

npoints = data.pos.shape[1]
x = torch.ones(1, 1, npoints ).to(device)
input_pts = data.pos.transpose(0,1).unsqueeze(0)

then:

outputs = model(x, input_pts)

from lightconvpoint.

shangguan9191 avatar shangguan9191 commented on July 25, 2024

(https://github.com/rusty1s/pytorch_geometric/blob/master/examples/pointnet2_classification.py))

Isnt his example already reshape the data?
`
i am really new to this.
could you give me more specific instruction for reshaping data in which steps? Loading data in trainloader, Forward pass, trainning loop?

from lightconvpoint.

aboulch avatar aboulch commented on July 25, 2024

Hello,
I am not familiar with pytorch_geometric. I do not about the data format.

from lightconvpoint.

Related Issues (15)

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.