src/pose_net.py
def evaluate_submit(self, sub):
        """Evaluation on test set for submission on ESA website"""
        for phase in ['test', 'real_test']:

            loop = tqdm(self.dataloader[phase], desc="Evaluation for submission",
                        bar_format='{l_bar}{bar:10}{r_bar}{bar:-10b}', file=sys.stdout)

            for inputs, filenames in loop:

                # Send inputs to GPU memory if device is CUDA
                inputs = inputs.to(self.config.DEVICE)

                # Runs the forward pass under autocast
                with torch.cuda.amp.autocast(enabled=self.config.USE_AMP):
                    # forward: predict output
                    ori, pos = self.predict(inputs, phase)

                if self.config.ORI_TYPE == 'Classification':
                    ori, _ = decode_ori_batch(ori, self.config.B)

                append = sub.append_real_test if phase == 'real_test' else sub.append_test
                for filename, q, r in zip(filenames, ori.cpu().numpy(), pos.cpu().numpy()):
                    append(filename, q, r)
Evaluation on test set for submission on ESA website
Evaluation on test set for submission on ESA website
Evaluation on test set for submission on ESA website
def evaluate_submit(self, sub):
        for phase in ['test', 'real_test']:
            loop = tqdm(self.dataloader[phase], desc="Evaluation for submission",
                        bar_format='{l_bar}{bar:10}{r_bar}{bar:-10b}', file=sys.stdout)
            for inputs, filenames in loop:
                inputs = inputs.to(self.config.DEVICE)
                with torch.cuda.amp.autocast(enabled=self.config.USE_AMP):
                    ori, pos = self.predict(inputs, phase)
                if self.config.ORI_TYPE == 'Classification':
                    ori, _ = decode_ori_batch(ori, self.config.B)
                append = sub.append_real_test if phase == 'real_test' else sub.append_test
                for filename, q, r in zip(filenames, ori.cpu().numpy(), pos.cpu().numpy()):
                    append(filename, q, r)
def evaluate_submit ( self , sub ) : for phase in [ 'test' , 'real_test' ] : loop = tqdm ( self . dataloader [ phase ] , desc = "Evaluation for submission" , bar_format = '{l_bar}{bar:10}{r_bar}{bar:-10b}' , file = sys . stdout ) for inputs , filenames in loop : inputs = inputs . to ( self . config . DEVICE ) with torch . cuda . amp . autocast ( enabled = self . config . USE_AMP ) : ori , pos = self . predict ( inputs , phase ) if self . config . ORI_TYPE == 'Classification' : ori , _ = decode_ori_batch ( ori , self . config . B ) append = sub . append_real_test if phase == 'real_test' else sub . append_test for filename , q , r in zip ( filenames , ori . cpu ( ) . numpy ( ) , pos . cpu ( ) . numpy ( ) ) : append ( filename , q , r )
Evaluation on test set for submission on ESA website
Evaluation on test set for submission on ESA website
"""Evaluation on test set for submission on ESA website""" # Send inputs to GPU memory if device is CUDA # Runs the forward pass under autocast # forward: predict output
self
sub