Hans-Lan / DASC7606-A2

11 stars 2 forks source link

Maybe need a float transation in Downsampling? #1

Open CjhHa1 opened 1 week ago

CjhHa1 commented 1 week ago

image In the test code the t is a int but should be multiplied with float weight in TImeMLP.

CjhHa1 commented 1 week ago

image What's more, I do think there should be an embedding function to cast int t into a latent space first.

Hans-Lan commented 1 week ago

First, pytorch will do data type conversion automatically when a int multiplying a float. Second, yes. There is an Embedding block in class Unet.

CjhHa1 commented 1 week ago

First, pytorch will do data type conversion automatically when a int multiplying a float. Second, yes. There is an Embedding block in class Unet.

Actually, when you just let like 3 be in the matrix multiplying, there will be a bug as it is just an integer. But if you use embedding all things are just fine.