brainstorm/structure/network.py
def provide_external_data(self, data, all_inputs=True):
        """
        Provide the data for this network to perform its forward and backward
        passes on.

        Args:
            data (dict):
                A dictionary of the data that will be copied to the outputs of
                the Input layer.
            all_inputs (bool):
                If set to False this method will NOT check that all inputs are
                provided. Defaults to True.
        """
        time_size, batch_size = data[next(iter(data))].shape[: 2]
        self.buffer = self._buffer_manager.resize(time_size, batch_size)
        for name, buf in self.buffer.Input.outputs.items():
            if name not in data.keys() and all_inputs is False:
                continue
            if isinstance(data[name], self.handler.array_type):
                self.handler.copy_to(data[name], buf)
            else:
                # assert isinstance(data[name], np.ndarray)
                self.handler.set_from_numpy(buf, data[name])

        Provide the data for this network to perform its forward and backward
        passes on.

        Args:
            data (dict):
                A dictionary of the data that will be copied to the outputs of
                the Input layer.
            all_inputs (bool):
                If set to False this method will NOT check that all inputs are
                provided. Defaults to True.
        
Provide the data for this network to perform its forward and backward
passes on.
Provide the data for this network to perform its forward and backward passes on .
def provide_external_data(self, data, all_inputs=True):
        time_size, batch_size = data[next(iter(data))].shape[: 2]
        self.buffer = self._buffer_manager.resize(time_size, batch_size)
        for name, buf in self.buffer.Input.outputs.items():
            if name not in data.keys() and all_inputs is False:
                continue
            if isinstance(data[name], self.handler.array_type):
                self.handler.copy_to(data[name], buf)
            else:
                self.handler.set_from_numpy(buf, data[name])
def provide_external_data ( self , data , all_inputs = True ) : time_size , batch_size = data [ next ( iter ( data ) ) ] . shape [ : 2 ] self . buffer = self . _buffer_manager . resize ( time_size , batch_size ) for name , buf in self . buffer . Input . outputs . items ( ) : if name not in data . keys ( ) and all_inputs is False : continue if isinstance ( data [ name ] , self . handler . array_type ) : self . handler . copy_to ( data [ name ] , buf ) else : self . handler . set_from_numpy ( buf , data [ name ] )
Provide the data for this network to perform its forward and backward
passes on.
Provide the data for this network to perform its forward and backward passes on .
"""
        Provide the data for this network to perform its forward and backward
        passes on.

        Args:
            data (dict):
                A dictionary of the data that will be copied to the outputs of
                the Input layer.
            all_inputs (bool):
                If set to False this method will NOT check that all inputs are
                provided. Defaults to True.
        """ # assert isinstance(data[name], np.ndarray)
self
data
A dictionary of the data that will be copied to the outputs of
the Input layer.
A dictionary of the data that will be copied to the outputs of the Input layer .
all_inputs
If set to False this method will NOT check that all inputs are
provided. Defaults to True.
If set to False this method will NOT check that all inputs are provided . Defaults to True .