@@ -0,0 +1,2021 @@
+/*******************************************************************************%0A * DIANNE  - Framework for distributed artificial neural networks%0A * Copyright (C) 2015  iMinds - IBCN - UGent%0A *%0A * This file is part of DIANNE.%0A *%0A * DIANNE is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as%0A * published by the Free Software Foundation, either version 3 of the%0A * License, or (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A *%0A * Contributors:%0A *     Tim Verbelen, Steven Bohez%0A *******************************************************************************/%0Apackage be.iminds.iot.dianne.api.nn.module;%0A%0Aimport be.iminds.iot.dianne.tensor.Tensor;%0A%0A/**%0A * The Memory Module is a special module for modeling memory. This module%0A * is used for storing state for recurrent neural networks. It will not automatically%0A * forward its output to the next module, but should be triggered externally. This %0A * way, inputs can be skipped for having more long term memory, and it can be used%0A * to build and train recurrent neural networks.  %0A * %0A * @author tverbele%0A *%0A */%0Apublic interface Memory extends Module %7B%0A%0A%09/**%0A%09 * Trigger the memory to forward output to the next Module%0A%09 */%0A%09public void triggerForward();%0A%09%0A%09/**%0A%09 * Trigger the memory to backward gradInput to the previous Module%0A%09 */%0A%09public void triggerBackward();%0A%09%0A%09/**%0A%09 * Get the current raw memory data%0A%09 * @return current memory Tensor%0A%09 */%0A%09public Tensor getMemory();%0A%0A%09/**%0A%09 * Push new data into the memory of this module%0A%09 * @param memory%0A%09 */%0A%09public void setMemory(final Tensor memory);%0A%09%0A%7D%0A

add Memory interface for memory modules