Coverage for /scratch/builds/bob/bob.med.tb/miniconda/conda-bld/bob.med.tb_1637571489937/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.8/site-packages/bob/med/tb/configs/models/logistic_regression.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

8 statements  

1#!/usr/bin/env python 

2# -*- coding: utf-8 -*- 

3 

4 

5"""Feedforward network for Tuberculosis Detection 

6 

7Simple feedforward network taking radiological signs in output 

8and predicting tuberculosis presence in output. 

9""" 

10 

11from torch.optim import Adam 

12from torch.nn import BCEWithLogitsLoss 

13from ...models.logistic_regression import build_logistic_regression 

14 

15 

16##### Config ##### 

17lr = 1e-2 

18 

19# model 

20model = build_logistic_regression(14) 

21 

22# optimizer 

23optimizer = Adam(model.parameters(), lr=lr) 

24 

25# criterion 

26criterion = BCEWithLogitsLoss()