1 /**
2     Allows one to provide input to a network via a dopt variable.
3     
4     Authors: Henry Gouk
5 */
6 module dopt.nnet.layers.datasource;
7 
8 import dopt.core;
9 import dopt.nnet;
10 
11 /**
12     Creates a $(D Layer) object that simply wraps an $(D Operation).
13 
14     This is most commonly used for wrapping an $(D Operation) made with $(D dopt.core.ops.float32()).
15 */
16 Layer dataSource(Operation var)
17 {
18     return new Layer(null, var, var, null);
19 }
20 
21 Layer dataSource(Operation var, Operation trainVar)
22 {
23     return new Layer(null, var, trainVar, null);
24 }