Comments (5)
Care to make a PR to accept a list and convert to a tensor? If not then I can take it on this weekend.
from torchgeo.
You will get to it way before me!
from torchgeo.
For a bit of history, I added this in #1221 and it initially only supported lists. In #1413, @ntw-au modified this to support lists, numpy arrays, and torch tensors. Then in #1541, I modified it to only accept torch tensors. I agree we need a way to support class_weights
in a YAML file (and preferably also on the command line). If omegaconf supports this, we could also easily enable omegaconf as a parser: https://lightning.ai/docs/pytorch/stable/cli/lightning_cli_advanced_2.html#enable-variable-interpolation.
from torchgeo.
I haven't looked at the Lightning CLI in awhile but I wonder if it supports recursive instantiation like
class_weights:
class_path: torch.tensor
init_args:
data: [0.5, 0.5]
from torchgeo.
If you want to use it with hydra.utils.instantiate and omegaconf you would only need to do the following:
class_weights:
_target_: torch.tensor
data: [0.5, 0.5]
from torchgeo.
Related Issues (20)
- CLI script for test HOT 2
- PatternNet download link is broken HOT 2
- VHR10 plot fails for negative split HOT 1
- VHR10 uses 'masks' as data_key, not 'mask' HOT 2
- Support classwise metrics HOT 3
- Support logging figures to multiple loggers HOT 8
- Figure plotting with Eurosat & classification trainer gives blank images HOT 3
- What values are being "clipped to the interval [0, 98]" HOT 4
- Adding custom dataset for multiclassification HOT 16
- VectorDataset has always the same time range from 0 to sys.maxsize and how to deal with multiple image and mask pairs for training. HOT 7
- BigEarthNet download links are broken HOT 3
- Normalization in Datamodules does not use correct statistics HOT 1
- RasterDataset: res does not change when crs changes HOT 12
- Multiclass Classification: assert num_classes >=2 HOT 4
- GridGeoSampler resamples same image repeatedly with separate_files and multiple dates HOT 5
- check Rwanda Fields dataset and tests HOT 1
- Arg for monitor in ObjectDetectionTask HOT 1
- CD
- Chesapeake RasterDatasets will not be able to be used "as is" in modeling HOT 4
- Support model in_chans not equal to pre-trained weights in_chans HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torchgeo.