ravens/agents/dummy.py
def train(self, dataset, num_iter, writer):
        """Train on dataset for a specific number of iterations."""
        for i in range(num_iter):
            obs, act, info = dataset.random_sample()

            # [Optional] Get heightmap from RGB-D images.
            configs = act['camera_config']
            colormap, heightmap = self.get_heightmap(obs, configs)

            # Do something here.

            # Compute training loss here.
            loss = 0.
            print(f'Train Iter: {self.total_iter + i} Loss: {loss:.4f}')

        self.total_iter += num_iter
        self.save()
Train on dataset for a specific number of iterations.
Train on dataset for a specific number of iterations.
Train on dataset for a specific number of iterations .
def train(self, dataset, num_iter, writer):
        for i in range(num_iter):
            obs, act, info = dataset.random_sample()
            configs = act['camera_config']
            colormap, heightmap = self.get_heightmap(obs, configs)
            loss = 0.
            print(f'Train Iter: {self.total_iter + i} Loss: {loss:.4f}')
        self.total_iter += num_iter
        self.save()
def train ( self , dataset , num_iter , writer ) : for i in range ( num_iter ) : obs , act , info = dataset . random_sample ( ) configs = act [ 'camera_config' ] colormap , heightmap = self . get_heightmap ( obs , configs ) loss = 0. print ( f'Train Iter: {self.total_iter + i} Loss: {loss:.4f}' ) self . total_iter += num_iter self . save ( )
Train on dataset for a specific number of iterations.
Train on dataset for a specific number of iterations .
"""Train on dataset for a specific number of iterations.""" # [Optional] Get heightmap from RGB-D images. # Do something here. # Compute training loss here.
self
dataset
num_iter
writer