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
15{
20 {
31 {
32 switch (p.type)
33 {
34 case LayerParameter.LayerType.HDF5_DATA:
35 return new HDF5DataLayer<double>(cuda, log, p);
36
37 default:
38 return null;
39 }
40 }
41
52 {
53 switch (p.type)
54 {
55 case LayerParameter.LayerType.HDF5_DATA:
56 return new HDF5DataLayer<float>(cuda, log, p);
57
58 default:
59 return null;
60 }
61 }
62 }
63}
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 HDF5DataLayer loads data from files in the HDF5 data format. This layer is initialized with the M...
The LayerFactor is responsible for creating all layers implemented in the MyCaffe....
Definition: LayerFactory.cs:20
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:30
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:51
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.hdf5 namespace contains all HDF5 related layers.
Definition: LayerFactory.cs:15
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