Comments (11)
Weights can be initialized in model's __init__
, so it has nothing to do with the imagenet example, right?
As for lr schedule, I think we can just do sth like
if hasattr(model, 'lr_schedule'):
lr = model.lr_schedule(epoch)
else:
lr = args.lr * (0.1 ** (epoch // 30))
from vision.
I've been trying to put weight initialization as part of the model, since it often seem particular to the type of architecture. I added it to the ResNet definition and I'm going to add it to the VGG model def:
https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py#L112
I'm not sure about learning rate schedule. It seems awkward to put it as part of the model definition, but as you point out, hard coding it in the ImageNet example isn't ideal either
from vision.
@apaszke @colesbury Thanks, I will do the same for SqueezeNet. Are there pre-defined initialization functions/classes for popular initialization schemes (e.g. like in Neon or Keras)?
@colesbury I think ideally we should provide a default learning schedule as a part of torch.vision
models and let users override it via command-line arguments.
from vision.
Yes, we should add them in nn somewhere.
from vision.
What do you think about this kind of regime inside of the model?
https://github.com/eladhoffer/convNet.pytorch/blob/master/models/alexnet.py
from vision.
Can't open it, are you sure the link is correct and the repo is public?
from vision.
How about https://raw.githubusercontent.com/eladhoffer/convNet.pytorch/master/models/alexnet.py
The repo is public
from vision.
That's one way to approach it, but I'm not sure if it's the most convenient one. Having a function that returns an optimizer for a given epoch seems more powerful.
from vision.
Is there/will there be a nice way to adapt the learning rate or momentum but keep other state in the optimizer, i.e. for Adam
from vision.
Should this issue be moved to the pytorch
repo instead?
from vision.
As you, guys, speak also here about weight initialization, what about DenseNet if we want to use a not pretrained model ?
According to Caffe official implementation, convolutions are initialized with something like kaiming_normal
.
from vision.
Related Issues (20)
- support compact/encoded RLE masks in COCO dataset wrapper HOT 5
- PyTorch standard Coco dataset (datasets.CocoDetection) not compatible with Faster R-CNN object detection model HOT 6
- Update typing input annotations to `convert_bounding_box_format`. HOT 2
- Allow size to equal max_size for resizes on longer edge
- Choose either 'long' or 'short' options for the resize anchor edge if the size variable is scalar HOT 3
- About uint16 support
- When VideoClip processes video, the final voice output time is not equal to the video time because of the different sampling of video and voice. HOT 1
- Unable to obtain results of ResNet50 v1 HOT 1
- Improved functionality for Oxford IIIT Pet data loader HOT 2
- Any operation on loaded image segfaults since 0.17.1 on Mac HOT 2
- Image scaling is performed incorrectly (in all detection models!) HOT 5
- IndexError: index 168 is out of bounds for dimension 0 with size 168 in keypointrcnn_loss HOT 1
- Nightly build flaky pytorch/vision / conda-py3_11-cpu builds HOT 1
- AVX512 support machine cannot resize uint8 image with BILINEAR interpolation as it is
- RuntimeError/AssertionError when finetuning fasterrcnn_resnet50_fpn on visdrone dataset HOT 3
- Mypy job is broken
- Regarding IMAGENET1K_V1 and IMAGENET1K_V2 weights
- Compiling resize_image: function interpolate not_implemented HOT 1
- AttributeError: module 'torchvision.transforms' has no attribute 'v2' HOT 1
- Run all torchvision models in one script. 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 vision.