Spaces:
Runtime error
Runtime error
File size: 668 Bytes
8ee14ff 2192664 8ee14ff 2192664 8ee14ff 2192664 8ee14ff 2192664 8ee14ff |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# -*- coding: utf-8 -*-
import logging
import pytest
log = logging.getLogger('pytest.conftest') # pylint: disable=invalid-name
@pytest.fixture()
def config():
return 'cv4e_lecture13/configs/mnist_resnet18.yaml'
@pytest.fixture()
def cfg(config):
from cv4e_lecture13 import utils
log = utils.init_logging()
cfg = utils.init_config(config, log)
cfg['output'] = 'cv4e_lecture13/{}'.format(cfg['output'])
return cfg
@pytest.fixture()
def device(cfg):
device = cfg.get('device')
return device
@pytest.fixture()
def net(cfg):
from cv4e_lecture13 import model
net, _, _ = model.load(cfg)
net.eval()
return net
|