diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28a35a2..b42d737 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,10 +16,10 @@ jobs: with: fetch-depth: 0 - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 cache-dependency-path: "**/pyproject.toml" cache: "pip" diff --git a/.gitignore b/.gitignore index f9761d9..756247c 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,5 @@ cython_debug/ .vscode .DS_Store coverage.lcov +data/ +*.h5 \ No newline at end of file diff --git a/environment-linux.yml b/environment-linux.yml new file mode 100644 index 0000000..69fdc31 --- /dev/null +++ b/environment-linux.yml @@ -0,0 +1,14 @@ +name: Nimbus_macOS +channels: + - defaults + - conda-forge +dependencies: + - cudatoolkit=11.8.0 + - python=3.11 + - pip + - hdf5 + - numpy + - pip: + - nvidia-cudnn-cu11==8.6.0.163 + - tensorflow==2.13.* + - . diff --git a/environment-macOS.yml b/environment-macOS.yml new file mode 100644 index 0000000..8743f06 --- /dev/null +++ b/environment-macOS.yml @@ -0,0 +1,13 @@ +name: Nimbus_macOS +channels: + - defaults + - conda-forge +dependencies: + - python=3.11 + - pip + - hdf5 + - numpy + - pip: + - tensorflow==2.13.* + - tensorflow-metal==1.0.1 + - . diff --git a/pyproject.toml b/pyproject.toml index bb054f4..eb56080 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,19 +21,19 @@ dependencies = [ "seaborn>=0.12", "alpineer>=0.1.5", "natsort>=7.1", - "tensorflow==2.8", - "protobuf<=3.20", + "tensorflow>=2.12", + "protobuf", ] name = "cell_classification" authors = [{ name = "Angelo Lab", email = "theangelolab@gmail.com" }] description = "Cell classification tool for classifying cells into marker positive and negative for arbitrary markers." readme = "README.md" -requires-python = ">=3.9" +requires-python = "==3.10" license = { text = "Modified Apache License 2.0" } classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "License :: OSI Approved :: Apache Software License", "Topic :: Scientific/Engineering :: Bio-Informatics", "Topic :: Scientific/Engineering :: Image Processing", diff --git a/src/deepcell/layers.py b/src/deepcell/layers.py index b1fc780..f85e2ba 100644 --- a/src/deepcell/layers.py +++ b/src/deepcell/layers.py @@ -31,8 +31,6 @@ from tensorflow.keras import constraints from tensorflow.keras import initializers from tensorflow.keras import regularizers -from keras.utils import conv_utils - logger = tf.get_logger() @@ -52,7 +50,7 @@ class UpsampleLike(Layer): def __init__(self, data_format=None, **kwargs): super().__init__(**kwargs) - self.data_format = conv_utils.normalize_data_format(data_format) + self.data_format = data_format def _resize_drop_axis(self, image, size, axis): image_shape = tf.shape(image) @@ -211,7 +209,7 @@ def __init__(self, self.filter_size = filter_size self.norm_method = norm_method - self.data_format = conv_utils.normalize_data_format(data_format) + self.data_format = data_format if self.data_format == 'channels_first': self.channel_axis = 1 @@ -343,7 +341,7 @@ def __init__(self, data_format=None, **kwargs): logger.warn('in_shape (from deepcell.layerse.location) is ' 'deprecated and will be removed in a future version.') super().__init__(**kwargs) - self.data_format = conv_utils.normalize_data_format(data_format) + self.data_format = data_format def compute_output_shape(self, input_shape): input_shape = tensor_shape.TensorShape(input_shape).as_list() @@ -406,7 +404,7 @@ def __init__(self, data_format=None, **kwargs): logger.warn('in_shape (from deepcell.layerse.location) is ' 'deprecated and will be removed in a future version.') super().__init__(**kwargs) - self.data_format = conv_utils.normalize_data_format(data_format) + self.data_format = data_format def compute_output_shape(self, input_shape): input_shape = tensor_shape.TensorShape(input_shape).as_list()