MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
LayerFactory.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6using MyCaffe.basecode;
7using MyCaffe.common;
8using MyCaffe.db.image;
9using MyCaffe.param;
10
19{
24 {
35 {
36 switch (p.type)
37 {
38 case LayerParameter.LayerType.ANNOTATED_DATA:
39 return new AnnotatedDataLayer<double>(cuda, log, p, db, evtCancel);
40
41 case LayerParameter.LayerType.DETECTION_EVALUATE:
42 return new DetectionEvaluateLayer<double>(cuda, log, p);
43
44 case LayerParameter.LayerType.DETECTION_OUTPUT:
45 return new DetectionOutputLayer<double>(cuda, log, p);
46
47 case LayerParameter.LayerType.MULTIBOX_LOSS:
48 return new MultiBoxLossLayer<double>(cuda, log, p);
49
50 case LayerParameter.LayerType.NORMALIZATION2:
51 return new Normalization2Layer<double>(cuda, log, p);
52
53 case LayerParameter.LayerType.PERMUTE:
54 return new PermuteLayer<double>(cuda, log, p);
55
56 case LayerParameter.LayerType.PRIORBOX:
57 return new PriorBoxLayer<double>(cuda, log, p);
58
59 case LayerParameter.LayerType.SMOOTHL1_LOSS:
60 return new SmoothL1LossLayer<double>(cuda, log, p);
61
62 case LayerParameter.LayerType.VIDEO_DATA:
63 return new VideoDataLayer<double>(cuda, log, p, db, evtCancel);
64
65 default:
66 return null;
67 }
68 }
69
80 {
81 switch (p.type)
82 {
83 case LayerParameter.LayerType.ANNOTATED_DATA:
84 return new AnnotatedDataLayer<float>(cuda, log, p, db, evtCancel);
85
86 case LayerParameter.LayerType.DETECTION_EVALUATE:
87 return new DetectionEvaluateLayer<float>(cuda, log, p);
88
89 case LayerParameter.LayerType.DETECTION_OUTPUT:
90 return new DetectionOutputLayer<float>(cuda, log, p);
91
92 case LayerParameter.LayerType.MULTIBOX_LOSS:
93 return new MultiBoxLossLayer<float>(cuda, log, p);
94
95 case LayerParameter.LayerType.NORMALIZATION2:
96 return new Normalization2Layer<float>(cuda, log, p);
97
98 case LayerParameter.LayerType.PERMUTE:
99 return new PermuteLayer<float>(cuda, log, p);
100
101 case LayerParameter.LayerType.PRIORBOX:
102 return new PriorBoxLayer<float>(cuda, log, p);
103
104 case LayerParameter.LayerType.SMOOTHL1_LOSS:
105 return new SmoothL1LossLayer<float>(cuda, log, p);
106
107 case LayerParameter.LayerType.VIDEO_DATA:
108 return new VideoDataLayer<float>(cuda, log, p, db, evtCancel);
109
110 default:
111 return null;
112 }
113 }
114 }
115}
The CancelEvent provides an extension to the manual cancel event that allows for overriding the manua...
Definition: CancelEvent.cs:17
The Log class provides general output in text form.
Definition: Log.cs:13
The CudaDnn object is the main interface to the Low-Level Cuda C++ DLL.
Definition: CudaDnn.cs:969
An interface for the units of computation which can be composed into a Net.
Definition: Layer.cs:31
The AnnotatedDataLayer provides annotated data to the Net by assigning top Blobs directly....
The DetectionEvaluateLayer generates the detection evaluation based on the DetectionOutputLayer and g...
The DetectionOutputLayer generates the detection output based on location and confidence predictions ...
The LayerFactor is responsible for creating all layers implemented in the MyCaffe....
Definition: LayerFactory.cs:24
Layer< float > CreateSingle(CudaDnn< float > cuda, Log log, LayerParameter p, CancelEvent evtCancel, IXDatabaseBase db)
Create the layers when using the float base type.
Definition: LayerFactory.cs:79
Layer< double > CreateDouble(CudaDnn< double > cuda, Log log, LayerParameter p, CancelEvent evtCancel, IXDatabaseBase db)
Create the layers when using the double base type.
Definition: LayerFactory.cs:34
The MultiBoxLossLayer performs multibox operations including the following:
The Normalization2Layer performs normalization used by the SSD algorithm. This layer is initialized w...
The PermuteLayer performs permutation on the input blob by changing the memory order of the data whic...
Definition: PermuteLayer.cs:23
The PriorBoxLayer generates prior boxes of designated sizes and aspect ratios across all dimensions o...
Fast R-CNN Copyright (c) Microsoft Licensed under The MIT License [see fast-rcnn/LICENSE for details]...
The VideoDataLayer provides data to the Net from a WebCam or Video file. This layer is initialized wi...
Specifies the base parameter for all layers.
LayerType type
Specifies the type of this LayerParameter.
LayerType
Specifies the layer type.
The ILayerCreator interface is implemented by each MyCaffe.layers.x layer extension dll and is used t...
Definition: Interfaces.cs:19
The IXDatabaseBase interface defines the general interface to the in-memory database.
Definition: Interfaces.cs:444
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
Definition: Annotation.cs:12
The MyCaffe.common namespace contains common MyCaffe classes.
Definition: BatchInput.cs:8
The MyCaffe.db.image namespace contains all image database related classes.
Definition: Database.cs:18
The MyCaffe.layers.ssd namespace contains all Single-Shot MultiBox (SSD) related layers.
Definition: LayerFactory.cs:19
The MyCaffe.param namespace contains parameters used to create models.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...
Definition: Annotation.cs:12