Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Environment Files #71

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,5 @@ cython_debug/
.vscode
.DS_Store
coverage.lcov
data/
*.h5
14 changes: 14 additions & 0 deletions environment-linux.yml
Original file line number Diff line number Diff line change
@@ -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.*
- .
13 changes: 13 additions & 0 deletions environment-macOS.yml
Original file line number Diff line number Diff line change
@@ -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
- .
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]" }]
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",
Expand Down
10 changes: 4 additions & 6 deletions src/deepcell/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down