<commit_before>import os
import glob

import tables

from unet3d.data import write_data_to_file
from unet3d.generator import get_training_and_validation_generators
from unet3d.model import unet_model_3d
from unet3d.training import load_old_model, train_model


config = dict()
config["pool_size"] = (2, 2, 2)
config["image_shape"] = (144, 144, 144)  # This determines what shape the images will be cropped/resampled to.
config["patch_shape"] = (64, 64, 64)
config["labels"] = (1, 2, 3, 4)
config["n_labels"] = len(config["labels"])
config["modalities"] = ["T1", "T1c", "Flair", "T2"]
config["training_modalities"] = ["T1", "T1c", "Flair"]  # set this to the modalities that you want the model to use
config["nb_channels"] = len(config["training_modalities"])
if "patch_shape" in config and config["patch_shape"] is not None:
    config["input_shape"] = tuple([config["nb_channels"]] + list(config["patch_shape"]))
else:
    config["input_shape"] = tuple([config["nb_channels"]] + list(config["image_shape"]))
config["truth_channel"] = config["nb_channels"]
config["deconvolution"] = True

config["batch_size"] = 6
config["validation_batch_size"] = 12
config["n_epochs"] = 500
config["patience"] = 10
config["early_stop"] = 50
config["initial_learning_rate"] = 0.00001
config["learning_rate_drop"] = 0.5
config["validation_split"] = 0.8
config["flip"] = True
config["distort"] = None  # switch to None if you want no distortion
config["validation_patch_overlap"] = 0
config["training_patch_start_offset"] = (16, 16, 16)

config["hdf5_file"] = os.path.abspath("brats_data.hdf5")
config["model_file"] = os.path.abspath("tumor_segmentation_model.h5")<commit_msg>Reduces validation batch size<commit_after>import os
import glob

import tables

from unet3d.data import write_data_to_file
from unet3d.generator import get_training_and_validation_generators
from unet3d.model import unet_model_3d
from unet3d.training import load_old_model, train_model


config = dict()
config["pool_size"] = (2, 2, 2)
config["image_shape"] = (144, 144, 144)  # This determines what shape the images will be cropped/resampled to.
config["patch_shape"] = (64, 64, 64)
config["labels"] = (1, 2, 3, 4)
config["n_labels"] = len(config["labels"])
config["modalities"] = ["T1", "T1c", "Flair", "T2"]
config["training_modalities"] = ["T1", "T1c", "Flair"]  # set this to the modalities that you want the model to use
config["nb_channels"] = len(config["training_modalities"])
if "patch_shape" in config and config["patch_shape"] is not None:
    config["input_shape"] = tuple([config["nb_channels"]] + list(config["patch_shape"]))
else:
    config["input_shape"] = tuple([config["nb_channels"]] + list(config["image_shape"]))
config["truth_channel"] = config["nb_channels"]
config["deconvolution"] = True

config["batch_size"] = 6
config["validation_batch_size"] = 6
config["n_epochs"] = 500
config["patience"] = 10
config["early_stop"] = 50
config["initial_learning_rate"] = 0.00001
config["learning_rate_drop"] = 0.5
config["validation_split"] = 0.8
config["flip"] = True
config["distort"] = None  # switch to None if you want no distortion
config["validation_patch_overlap"] = 0
config["training_patch_start_offset"] = (16, 16, 16)

config["hdf5_file"] = os.path.abspath("brats_data.hdf5")
config["model_file"] = os.path.abspath("tumor_segmentation_model.h5")
{'fraction_non_alphanumeric': 0.15670969678775143, 'fraction_numerical': 0.036925848093665566, 'mean_word_length': 7.33, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7340369', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1125, 'n_words': 272}