-
Notifications
You must be signed in to change notification settings - Fork 3
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
Updating demo notebook for training #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we update the paths of the public.czbiohub
we need to update thes paths.
@edyoshikun The hosting is back at https://public.czbiohub.org/comp.micro/viscy/. Can you update the paths? |
examples/demo_dlmbl/setup.sh
Outdated
git checkout 7c5e4c1d68e70163cf514d22c475da8ea7dc3a88 # Exercise is tested with this commit of viscy | ||
# Find path to the environment - mamba activate doesn't work from within shell scripts. | ||
ENV_PATH=$(conda info --envs | grep 04_image_translation | awk '{print $NF}') | ||
git checkout main # Exercise is tested with this commit of viscy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably pin a version here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this needs to be pinned after merging this PR...
examples/demo_dlmbl/solution.py
Outdated
data_path, | ||
source_channel="Phase", | ||
target_channel=["Membrane", "Nuclei"], | ||
architecture="fcmae", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fcmae -> unext2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned, we added an alias so that UNeXt2_2D
== fcmae architecture to avoid introducing changes that don't allow the re-loading of weights for reproducibility. We will merge the UNeXt2 and fcmae architectures after the release.
# PyTorch uses dynamic graphs under the hood. The graphs are constructed on the fly. This is in contrast to TensorFlow, where the graph is constructed before the training loop and remains static. In other words, the graph of the network can change with every forward pass. Therefore, we need to supply an input tensor to construct the graph. The input tensor can be a random tensor of the correct shape and type. We can also supply a real image from the dataset. The latter is more useful for debugging. | ||
# PyTorch uses dynamic graphs under the hood. | ||
# The graphs are constructed on the fly. | ||
# This is in contrast to TensorFlow, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still true for TF 2.x? https://www.tensorflow.org/guide/migrate/tf1_vs_tf2#eager_execution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won't be able to test the exercise before completing the work on manuscript(s). Please merge when you have confidence that all parts of the exercise can be run.
|
||
# %% tags=["solution"] | ||
|
||
########################## | ||
######## Solution ######## | ||
########################## | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edyoshikun and @ziw-liu have you executed this and the following cells to test that the model can be trained? If so, let's keep the VSCyto3D model here. Otherwise, you can delete this part of the exercise.
This PR adds a demo notebook for the DL@MBL 2024 course.