-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Switch LayerType to string for extensibility #1685
Copy link
Copy link
Closed
Labels
Description
Originally proposed by @jeffdonahue
The bookkeeping for the LayerType enum in caffe.proto is a hassle. Having a coordination-free method to add layers would make life easier and open up Caffe for extension in forks or a potential "sandbox" section of the project.
The layer type could just be the C++ class name of the layer, minus the "Layer" at the end. So, it would look like:
layers {
name: "accuracy"
class: "Accuracy" # for class AccuracyLayer
...
}
Introducing the class field instead of type gives a signature for automatically upgrading net definitions like we've done in the past.
LayerParameter is another obstacle. Since these are actual fields they still require unique IDs. Any thoughts on a workaround?
Reactions are currently unavailable