public CrossEntropyLoss(SyftController controller) { init("crossentropyloss"); #pragma warning disable 420 id = System.Threading.Interlocked.Increment(ref nCreated); controller.addModel(this); }
public Sigmoid(SyftController controller) { init("sigmoid"); #pragma warning disable 420 id = System.Threading.Interlocked.Increment(ref nCreated); controller.addModel(this); }
public ReLU(SyftController controller, GraphProto graph) { init(this.name); #pragma warning disable 420 id = System.Threading.Interlocked.Increment(ref nCreated); controller.addModel(this); }
public Softmax(SyftController controller, GraphProto graph) { init(this.name); this.dim = (int)graph.Node[0].Attribute[0].I; #pragma warning disable 420 id = System.Threading.Interlocked.Increment(ref nCreated); controller.addModel(this); }
public Softmax(SyftController controller, int dim) { init(this.name); this.dim = dim; #pragma warning disable 420 id = System.Threading.Interlocked.Increment(ref nCreated); controller.addModel(this); }
public Policy(SyftController _controller, Layer _model) { init("policy"); controller = _controller; model = _model; #pragma warning disable 420 id = System.Threading.Interlocked.Increment(ref nCreated); controller.addModel(this); }
public Embedding(SyftController controller, int numEmbeddings, int embeddingDim) { init("embedding"); this.controller = controller; _numEmbeddings = numEmbeddings; _embeddingDim = embeddingDim; int[] weightShape = { _numEmbeddings, _embeddingDim }; var weights = controller.RandomWeights(_numEmbeddings * _embeddingDim); _weights = controller.floatTensorFactory.Create(_shape: weightShape, _data: weights, _autograd: true, _keepgrads: true); parameters.Add(_weights.Id); #pragma warning disable 420 id = System.Threading.Interlocked.Increment(ref nCreated); controller.addModel(this); }