Conversation
gwaybio
left a comment
There was a problem hiding this comment.
A couple comments (mostly about hardcoding, and one about duplicating functions) that should be addressed prior to merging.
latent_space/main_latent.py
Outdated
| for t in range(9): | ||
| z = tdvae.forward(images, t) | ||
| z_values.append(z.cpu().detach().numpy()) | ||
| # print(np.array(z_values).shape) |
There was a problem hiding this comment.
it's best to remove debugging lines prior to merging
latent_space/main_latent.py
Outdated
| for i in range(9): | ||
| for j in range(2): | ||
| for k in range(16): |
There was a problem hiding this comment.
Why are these values hardcoded? Are there constants defined above that you could use instead?
latent_space/main_latent.py
Outdated
| for i in range(9): | ||
| for j in range(2): | ||
| for k in range(16): | ||
| # frame1 = z_values[i][0] |
latent_space/main_latent.py
Outdated
|
|
||
|
|
||
| z_df = pd.DataFrame(columns=["x", "y", "z", "vid"]) | ||
| for i in range(9): |
There was a problem hiding this comment.
I recommend naming these iterators to be more descriptive? What does i, j, and k stand for? The answers to this question should be the variable name :)
| ax = fig.add_subplot(projection="3d") | ||
|
|
||
| colors = {0: "orange", 1: "g"} | ||
| for i in range(2): |
There was a problem hiding this comment.
avoid hardcoding the number 2 here. Is there a variable that can replace?
latent_space/model_latent.py
Outdated
| @@ -0,0 +1,380 @@ | |||
| __author__ = "Keenan Manpearl" | |||
There was a problem hiding this comment.
I'm a bit confused why you need this script? Doesn't it exist somewhere else in this repo? Would it be possible to import from there (instead of, presumably, duplicating the code)?
I created the scripts in the latent_space folder to extract the z dimensions from the model.
main_latentis a modified version ofmain_train.model_latentis a version ofmodelthat has been edited to create z values for every time point, not just t2.