Skip to content

Conversation

@kmanpearl
Copy link
Contributor

I created the scripts in the latent_space folder to extract the z dimensions from the model. main_latent is a modified version of main_train. model_latent is a version of model that has been edited to create z values for every time point, not just t2.

Copy link
Member

@gwaybio gwaybio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple comments (mostly about hardcoding, and one about duplicating functions) that should be addressed prior to merging.

for t in range(9):
z = tdvae.forward(images, t)
z_values.append(z.cpu().detach().numpy())
# print(np.array(z_values).shape)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's best to remove debugging lines prior to merging

Comment on lines 78 to 80
for i in range(9):
for j in range(2):
for k in range(16):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these values hardcoded? Are there constants defined above that you could use instead?

for i in range(9):
for j in range(2):
for k in range(16):
# frame1 = z_values[i][0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug line?



z_df = pd.DataFrame(columns=["x", "y", "z", "vid"])
for i in range(9):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid hardcoding the number 2 here. Is there a variable that can replace?

@@ -0,0 +1,380 @@
__author__ = "Keenan Manpearl"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants