question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't able to train the num_classes=1

See original GitHub issue
model =SemanticSegmentationTask(
    segmentation_model="fcn",
    encoder_name="resnet18",
    encoder_weights="imagenet",
    in_channels=9,
    num_classes=1,
    num_filters=128,
    loss="jaccard",
    ignore_zeros=True,
    learning_rate=0.1,
    learning_rate_schedule_patience=0.05,
    
)

trainer = pl.Trainer(

                  gpus=0,
                  callbacks=[checkpoint_callback, early_stopping_callback],
                  logger=[csv_logger],
                  min_epochs=10,
                  max_epochs=100,
                  precision=32,
                  log_every_n_steps=0.01,
                  max_steps=8,
                  
               )

trainer.fit(model,dl,dl)

Hi, as I want to do the binary sematic segmentation I need num_clasess=1 can I have any scope of doing with single class

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
calebrob6commented, May 6, 2022

Yeah probably, I just don’t have time to play around with it 😃

On Fri, May 6, 2022 at 1:10 PM Adam J. Stewart @.***> wrote:

Could we add a conditional that automatically switches to BCE for num_classes=1?

— Reply to this email directly, view it on GitHub https://github.com/microsoft/torchgeo/issues/521#issuecomment-1119974917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIJUTXTHM4OVMN4WU6PBYDVIV4E5ANCNFSM5U3GS2RQ . You are receiving this because you commented.Message ID: @.***>

0reactions
adamjstewartcommented, May 6, 2022

I think this is also related to #245. So it’s not just loss, it’s also IoU.

Read more comments on GitHub >

github_iconTop Results From Across the Web

why my training yolov2 network can't work? - MATLAB Answers
I trained my data set according to the official documentation, detecting people in the ... The pre-training network also uses resnet50. ... numClasses...
Read more >
Home - CDC TRAIN - an affiliate of the TRAIN Learning ...
Through this site you can: Find training and locate CDC courses with continuing education (CE); Track your learning via a single transcript ...
Read more >
5 Easy Steps To Effectively Train Your Staff - MidwestHR
Ideally, the primary responsibilities have already been documented in the job description you have on file. Review your employees' knowledge, skill, and ability...
Read more >
Who Says You Can't Train A Cat? A Book Of Tips For Feline ...
Feline behavior specialist Sarah Ellis explains how you can train your kitty to come on command, take medicine and stop waking you up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found