Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
mute tf1.15 warnings; resume unet (nonewnet) unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wyli committed Dec 17, 2019
1 parent 9ee918c commit 11e356e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ testjob:
- coverage run -a --source . net_segment.py inference -c config/vnet_config.ini --batch_size 16 --spatial_window_size 64,64,64 --queue_length 32 --activation_function relu

# need a large GPU to run
#- coverage run -a --source . net_segment.py train -c config/unet_config.ini --batch_size 1 --queue_length 5 --num_threads 2
#- coverage run -a --source . net_segment.py inference -c config/unet_config.ini --batch_size 1 --spatial_window_size 96,96,96 --queue_length 5
- coverage run -a --source . net_segment.py train -c config/unet_config.ini --batch_size 1 --queue_length 5 --num_threads 2
- coverage run -a --source . net_segment.py inference -c config/unet_config.ini --batch_size 1 --spatial_window_size 96,96,96 --queue_length 5

#- coverage run -a --source . net_segment.py train -c config/deepmedic_config.ini --batch_size 128 --queue_length 48 --num_threads 4
#- coverage run -a --source . net_segment.py inference -c config/deepmedic_config.ini --batch_size 12 --spatial_window_size 135,135,135 --queue_length 128
Expand Down
12 changes: 6 additions & 6 deletions config/unet_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interp_order = 3
path_to_search = ./example_volumes/monomodal_parcellation
filename_contains = Label
filename_not_contains =
spatial_window_size = (8, 8, 8)
spatial_window_size = (96, 96, 96)
pixdim = (1.0, 1.0, 1.0)
axcodes=(A, R, S)
interp_order = 0
Expand All @@ -23,14 +23,14 @@ num_gpus = 1
model_dir = ./models/model_unet

[NETWORK]
name = unet
name = nonewnet
activation_function = prelu
batch_size = 1
decay = 0
reg_type = L2

# volume level preprocessing
volume_padding_size = 44
volume_padding_size = 10
# histogram normalisation
histogram_ref_file = ./example_volumes/monomodal_parcellation/standardisation_models.txt
norm_type = percentile
Expand All @@ -56,11 +56,11 @@ max_iter = 10
max_checkpoints = 20

[INFERENCE]
border = (24, 24, 24)
#inference_iter = 10
# border = (24, 24, 24)
# inference_iter = 10
save_seg_dir = ./output/unet
output_interp_order = 0
spatial_window_size = (105, 105, 105)
spatial_window_size = (104, 104, 104)

############################ custom configuration sections
[SEGMENTATION]
Expand Down
11 changes: 11 additions & 0 deletions niftynet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@

import os

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
from tensorflow.python.util import deprecation
deprecation._PRINT_DEPRECATION_WARNINGS = False
try:
from tensorflow.python.util import module_wrapper as deprecation
except ImportError:
from tensorflow.python.util import deprecation_wrapper as deprecation
deprecation._PER_MODULE_WARNING_LIMIT = 0


from niftynet.io.misc_io import set_logger, close_logger

set_logger()
Expand Down

0 comments on commit 11e356e

Please sign in to comment.