Ejemplo n.º 1
0
        public override void ShallowCopyWeightTo(SimpleLayer destLayer)
        {
            LSTMLayer layer = destLayer as LSTMLayer;

            layer.SparseFeatureSize = SparseFeatureSize;
            layer.DenseFeatureSize  = DenseFeatureSize;

            layer.sparseFeatureWeights      = sparseFeatureWeights;
            layer.sparseFeatureWeightsDelta = sparseFeatureWeightsDelta;
            layer.sparseFeatureLearningRate = sparseFeatureLearningRate;

            layer.wDenseCellGate   = wDenseCellGate.CloneSharedWeights();
            layer.wDenseForgetGate = wDenseForgetGate.CloneSharedWeights();
            layer.wDenseInputGate  = wDenseInputGate.CloneSharedWeights();
            layer.wDenseOutputGate = wDenseOutputGate.CloneSharedWeights();

            layer.CellWeights   = CellWeights;
            layer.cellDelta     = cellDelta;
            layer.peepholeDelta = peepholeDelta;

            layer.InitializeInternalTrainingParameters();
        }
Ejemplo n.º 2
0
        public override void ShallowCopyWeightTo(SimpleLayer destLayer)
        {
            LSTMLayer layer = destLayer as LSTMLayer;

            layer.SparseFeatureSize = SparseFeatureSize;
            layer.DenseFeatureSize  = DenseFeatureSize;

            layer.sparseFeatureWeights = sparseFeatureWeights;
            layer.sparseFeatureToHiddenLearningRate = sparseFeatureToHiddenLearningRate;

            layer.wDenseCellGate   = wDenseCellGate.CloneSharedWeights();
            layer.wDenseForgetGate = wDenseForgetGate.CloneSharedWeights();
            layer.wDenseInputGate  = wDenseInputGate.CloneSharedWeights();
            layer.wDenseOutputGate = wDenseOutputGate.CloneSharedWeights();

            layer.CellWeights = CellWeights;

            layer.lockerDenseFeature  = lockerDenseFeature;
            layer.lockerSparseFeature = lockerSparseFeature;
            layer.cellLockers         = cellLockers;

            layer.InitializeInternalTrainingParameters();
        }