def _log_param(self, param):
    try:
        self._save_for_tensor(tensor_name=param.name, tensor_value=param.data(param.list_ctx()[0]))
        if (param.grad_req != 'null'):
            self._save_for_tensor(tensor_name=(self.GRADIENT_PREFIX + param.name), tensor_value=param.grad(param.list_ctx()[0]))
    except RuntimeError as e:
        self.logger.warning(f'Could not log parameter {param.name} due to the mxnet exception: {e}')
def _log_param(self, param):
    try:
        self._save_for_tensor(tensor_name=param.name, tensor_value=param.data(param.list_ctx()[0]))
        if (param.grad_req != 'null'):
            self._save_for_tensor(tensor_name=(self.GRADIENT_PREFIX + param.name), tensor_value=param.grad(param.list_ctx()[0]))
    except RuntimeError as e:
        self.logger.warning(f'Could not log parameter {param.name} due to the mxnet exception: {e}')