-
Notifications
You must be signed in to change notification settings - Fork 0
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
TypeError #3
Comments
Hello!, Can you give the trace of the error? in what line occurs? |
Hello!
Here is the problem:
File "/MPCC-master/sample.py", line 186, in <module>
main()
File "/MPCC-master/sample.py", line 183, in main
run(config)
File "/MPCC-master/sample.py", line 103, in run
images, labels = sample()
TypeError: sample() got an unexpected keyword argument 'z_'
Looking forward to your reply!
…------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年4月30日(星期五) 凌晨0:16
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!, Can you give the trace of the error? in what line occurs?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem. Greetings. |
Hello!
There's more problem:
Traceback (most recent call last):
File "/home/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1659, in _create_c_op
c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape must be rank 2 but is rank 1 for 'MatMul' (op: 'MatMul') with input shapes: [2048], [2048,1008].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/MPCC-master/inception_tf13_p.py", line 170, in <module>
main()
File "/MPCC-master/inception_tf13_p.py", line 167, in main
run(config)
File "/MPCC-master/inception_tf13_p.py", line 128, in run
_init_inception()
File "/MPCC-master/inception_tf13_p.py", line 124, in _init_inception
logits = tf.matmul(tf.squeeze(pool3), w)
File "/home/tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 2455, in matmul
a, b, transpose_a=transpose_a, transpose_b=transpose_b, name=name)
File "/home/tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 5333, in mat_mul
name=name)
File "/home/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "/home/tensorflow/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op
op_def=op_def)
File "/home/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1823, in __init__
control_input_ops)
File "/home/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1662, in _create_c_op
raise ValueError(str(e))
ValueError: Shape must be rank 2 but is rank 1 for 'MatMul' (op: 'MatMul') with input shapes: [2048], [2048,1008].
…------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年5月2日(星期天) 凌晨0:28
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem.
Greetings.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hello, Sorry to hear that, I hope I can help you. However to help you I need you to tell me exactly what you did so I can reproduce the error and help. With the sh scripts if possible. For what I can tell is a problem in the inception network, but I can't be sure. Greetings |
Hello!
I have finished training and ran the sample.py file to get sample.npz. In the process of running inception_tf13_p.py to test, the above error occurred. I did not change any parameters. I don’t know why this error happens.
it seems to be an error in this place:
File "/MPCC-master/inception_tf13_p.py", line 124, in _init_inception
logits = tf.matmul(tf.squeeze(pool3), w)
Looking forward to your reply!
…------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年5月7日(星期五) 晚上9:51
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
Hello,
Sorry to hear that, I hope I can help you. However to help you I need you to tell me exactly what you did so I can reproduce the error and help. With the sh scripts if possible. For what I can tell is a problem in the inception network, but I can't be sure.
Greetings
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hello!
I don't exactly understand the sentence ' Under Gaussian conditional distribution the latent space becomes a GMM', can you explain how to make z obey GMM? My understand is y is a tensor with alternating 0 and 1. Using the mean and variance of y to get the distribution of z according to the reparameter trick, but how to get the mean and variance of y? And, after getting the distribution of z, how can we ensure that it obeys GMM?
Looking forward to your reply!
…------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年5月2日(星期天) 凌晨0:28
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem.
Greetings.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hello!
I also have questions about the Cluster membership part in the Diagram of the MPCC model, is this a network? When you obtain a z, you update y through this network?
…------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年5月2日(星期天) 凌晨0:28
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem.
Greetings.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
y is a categorical variable so we associate for example y = c to a Gaussian N(mu_c, sigma_c^2). if p(z|y) is Gaussian N(mu_c, sigma_c^2) (for example) then p(z) becomes p(z) = \sum_{c=1}^{K}p(z|y)p(y) = \sum_{c=1}^{K}N(mu_c, sigma_c^2) p(y) (by the definition of marginalization). p(y) is the prior of the categorical variable but we set to be uniform for simplicity and because the dataset is balanced.
…________________________________
From: xuaiyishen2012 ***@***.***>
Sent: Wednesday, July 21, 2021 11:17 PM
To: jumpynitro/MPCC ***@***.***>
Cc: jumpynitro ***@***.***>; Comment ***@***.***>
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!
I don't exactly understand the sentence ' Under Gaussian conditional distribution the latent space becomes a GMM', can you explain how to make z obey GMM? My understand is y is a tensor with alternating 0 and 1. Using the mean and variance of y to get the distribution of z according to the reparameter trick, but how to get the mean and variance of y? And, after getting the distribution of z, how can we ensure that it obeys GMM?
Looking forward to your reply!
------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年5月2日(星期天) 凌晨0:28
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem.
Greetings.
―
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVMCBPHA2JH4F7CESBUJILTY6EUJANCNFSM43ZWB3SQ>.
|
Yes (you can see that in the code for more details). q(y|z) can be either a neural network or simply a cluster membership, since we use the reparameterization trick the gradients can flow through z.
Hopes this helps.
…________________________________
From: xuaiyishen2012 ***@***.***>
Sent: Thursday, July 22, 2021 9:16 AM
To: jumpynitro/MPCC ***@***.***>
Cc: jumpynitro ***@***.***>; Comment ***@***.***>
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!
I also have questions about the Cluster membership part in the Diagram of the MPCC model, is this a network? When you obtain a z, you update y through this network?
------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年5月2日(星期天) 凌晨0:28
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem.
Greetings.
―
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVMCBLQNZ5RRWRKN6YWUWDTZAKZRANCNFSM43ZWB3SQ>.
|
I didn't find this network in the code,could you please give me a hand?
…---Original---
From: ***@***.***>
Date: Fri, Jul 23, 2021 02:02 AM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Yes (you can see that in the code for more details). q(y|z) can be either a neural network or simply a cluster membership, since we use the reparameterization trick the gradients can flow through z.
Hopes this helps.
________________________________
From: xuaiyishen2012 ***@***.***>
Sent: Thursday, July 22, 2021 9:16 AM
To: jumpynitro/MPCC ***@***.***>
Cc: jumpynitro ***@***.***>; Comment ***@***.***>
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!
I also have questions about the Cluster membership part in the&nbsp;Diagram of the MPCC model, is this a network? When you obtain a z, you update y through this network?
------------------&nbsp;原始邮件&nbsp;------------------
发件人: "jumpynitro/MPCC" ***@***.***&gt;;
发送时间:&nbsp;2021年5月2日(星期天) 凌晨0:28
***@***.***&gt;;
***@***.******@***.***&gt;;
主题:&nbsp;Re: [jumpynitro/MPCC] TypeError (#3)
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem.
Greetings.
―
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVMCBLQNZ5RRWRKN6YWUWDTZAKZRANCNFSM43ZWB3SQ>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hello!
In the code, I guess
def obtain_latent_from_z_y_gmm(self, z, y):
mu = self.mu_c[y.view(-1).long()]
log_var = self.lv_c[y.view(-1).long()]
std = self.my_transform_lv(log_var, self.sigma)
z_samples = mu.addcmul(std, z) #z_samples=mu+std*z(对应元素相乘)
return z_samples
this part is the reparameter trick, but which part reflects the update y?
…------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年7月23日(星期五) 凌晨2:02
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
Yes (you can see that in the code for more details). q(y|z) can be either a neural network or simply a cluster membership, since we use the reparameterization trick the gradients can flow through z.
Hopes this helps.
________________________________
From: xuaiyishen2012 ***@***.***>
Sent: Thursday, July 22, 2021 9:16 AM
To: jumpynitro/MPCC ***@***.***>
Cc: jumpynitro ***@***.***>; Comment ***@***.***>
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!
I also have questions about the Cluster membership part in the&nbsp;Diagram of the MPCC model, is this a network? When you obtain a z, you update y through this network?
------------------&nbsp;原始邮件&nbsp;------------------
发件人: "jumpynitro/MPCC" ***@***.***&gt;;
发送时间:&nbsp;2021年5月2日(星期天) 凌晨0:28
***@***.***&gt;;
***@***.******@***.***&gt;;
主题:&nbsp;Re: [jumpynitro/MPCC] TypeError (#3)
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem.
Greetings.
―
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVMCBLQNZ5RRWRKN6YWUWDTZAKZRANCNFSM43ZWB3SQ>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sorry for the late response, I'm finishing my master thesis and I'm super busy x.x. The code that you showed me is from the generative model part, associated mainly to p(z|y). y is never updated and is assumed uniform (although you can assume other distributions or even use a Gumbel Softmax trick to update y). What is optimized is mu_c and lv_c (parameters of the mixture prior). Both of these parameters are updated from gradient of the generative model and the inference model, the gradients of the generative model flow through p(x|z) and p(z|y). The gradients of the inference model flow through q(y|z) that ensure that all the modes of the mixture distribution are well separated.
Hopes this helps.
…________________________________
From: xuaiyishen2012 ***@***.***>
Sent: Monday, July 26, 2021 6:41 AM
To: jumpynitro/MPCC ***@***.***>
Cc: jumpynitro ***@***.***>; Comment ***@***.***>
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!
In the code, I guess
def obtain_latent_from_z_y_gmm(self, z, y):
mu = self.mu_c[y.view(-1).long()]
log_var = self.lv_c[y.view(-1).long()]
std = self.my_transform_lv(log_var, self.sigma)
z_samples = mu.addcmul(std, z) #z_samples=mu+std*z(对应元素相乘)
return z_samples
this part is the reparameter trick, but which part reflects the update y?
------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年7月23日(星期五) 凌晨2:02
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
Yes (you can see that in the code for more details). q(y|z) can be either a neural network or simply a cluster membership, since we use the reparameterization trick the gradients can flow through z.
Hopes this helps.
________________________________
From: xuaiyishen2012 ***@***.***>
Sent: Thursday, July 22, 2021 9:16 AM
To: jumpynitro/MPCC ***@***.***>
Cc: jumpynitro ***@***.***>; Comment ***@***.***>
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!
I also have questions about the Cluster membership part in the&nbsp;Diagram of the MPCC model, is this a network? When you obtain a z, you update y through this network?
------------------&nbsp;原始邮件&nbsp;------------------
发件人: "jumpynitro/MPCC" ***@***.***&gt;;
发送时间:&nbsp;2021年5月2日(星期天) 凌晨0:28
***@***.***&gt;;
***@***.******@***.***&gt;;
主题:&nbsp;Re: [jumpynitro/MPCC] TypeError (#3)
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem.
Greetings.
D
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
D
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVMCBLQNZ5RRWRKN6YWUWDTZAKZRANCNFSM43ZWB3SQ>.
―
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVMCBPTSPJTLJYCSMHHRQLTZU3VXANCNFSM43ZWB3SQ>.
|
Sorry to bother you again.
In your model, I'm interested in your ideas of making the latent space obey GMM. So please forgive the repeatedly interruption and asking.
I don't understand 'y is assumed uniform', what exactly distribution does y obey? And I still can't sort out the whole GMM idea. Why exactly does z obey GMM or how to achieve the whole idea through the code?
Recently I kept trying to find the whole GMM ideas in your code. However, your code is encapsulated too well, and the writing is relatively advanced. So I had many problems to understand the GMM ideas through your code.
Hope your master's thesis can be successfully completed!
Looking forward to your reply!
…------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年8月2日(星期一) 下午3:45
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
Sorry for the late response, I'm finishing my master thesis and I'm super busy x.x. The code that you showed me is from the generative model part, associated mainly to p(z|y). y is never updated and is assumed uniform (although you can assume other distributions or even use a Gumbel Softmax trick to update y). What is optimized is mu_c and lv_c (parameters of the mixture prior). Both of these parameters are updated from gradient of the generative model and the inference model, the gradients of the generative model flow through p(x|z) and p(z|y). The gradients of the inference model flow through q(y|z) that ensure that all the modes of the mixture distribution are well separated.
Hopes this helps.
________________________________
From: xuaiyishen2012 ***@***.***>
Sent: Monday, July 26, 2021 6:41 AM
To: jumpynitro/MPCC ***@***.***>
Cc: jumpynitro ***@***.***>; Comment ***@***.***>
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!
In the code, I guess
def obtain_latent_from_z_y_gmm(self, z, y):
mu = self.mu_c[y.view(-1).long()]
log_var = self.lv_c[y.view(-1).long()]
std = self.my_transform_lv(log_var, self.sigma)
z_samples = mu.addcmul(std, z) #z_samples=mu+std*z(对应元素相乘)
return z_samples
this part is the reparameter trick, but which part reflects the update y?
------------------&nbsp;原始邮件&nbsp;------------------
发件人: "jumpynitro/MPCC" ***@***.***&gt;;
发送时间:&nbsp;2021年7月23日(星期五) 凌晨2:02
***@***.***&gt;;
***@***.******@***.***&gt;;
主题:&nbsp;Re: [jumpynitro/MPCC] TypeError (#3)
Yes (you can see that in the code for more details). q(y|z) can be either a neural network or simply a cluster membership, since we use the reparameterization trick the gradients can flow through z.
Hopes this helps.
________________________________
From: xuaiyishen2012 ***@***.***&gt;
Sent: Thursday, July 22, 2021 9:16 AM
To: jumpynitro/MPCC ***@***.***&gt;
Cc: jumpynitro ***@***.***&gt;; Comment ***@***.***&gt;
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!
I also have questions about the Cluster membership part in the&amp;nbsp;Diagram of the MPCC model, is this a network? When you obtain a z, you update y through this network?
------------------&amp;nbsp;原始邮件&amp;nbsp;------------------
发件人: "jumpynitro/MPCC" ***@***.***&amp;gt;;
发送时间:&amp;nbsp;2021年5月2日(星期天) 凌晨0:28
***@***.***&amp;gt;;
***@***.******@***.***&amp;gt;;
主题:&amp;nbsp;Re: [jumpynitro/MPCC] TypeError (#3)
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem.
Greetings.
D
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
D
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)&gt;, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVMCBLQNZ5RRWRKN6YWUWDTZAKZRANCNFSM43ZWB3SQ&gt;.
―
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVMCBPTSPJTLJYCSMHHRQLTZU3VXANCNFSM43ZWB3SQ>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hello!
In the train_fns.py,
for i in range(config['num_iter_prior_acc']):
z_.sample_()
latent = G_E.P.obtain_latent_from_z_y(z_, y)
with torch.no_grad(): # 可以让节点不进行求梯度
if config['parallel']:
o = nn.parallel.data_parallel(G_E.G, (latent, G_E.G.shared(y)))
else:
o = G_E.G(latent, G_E.G.shared(y))
if config['parallel']:
z_mu, z_var = nn.parallel.data_parallel(G_E.E, o)
else:
z_mu, z_var = G_E.E(o)
what does z_.sample_() mean or the sample_() function do?
Looking forward to your reply!
…------------------ 原始邮件 ------------------
发件人: "jumpynitro/MPCC" ***@***.***>;
发送时间: 2021年8月2日(星期一) 下午3:45
***@***.***>;
***@***.******@***.***>;
主题: Re: [jumpynitro/MPCC] TypeError (#3)
Sorry for the late response, I'm finishing my master thesis and I'm super busy x.x. The code that you showed me is from the generative model part, associated mainly to p(z|y). y is never updated and is assumed uniform (although you can assume other distributions or even use a Gumbel Softmax trick to update y). What is optimized is mu_c and lv_c (parameters of the mixture prior). Both of these parameters are updated from gradient of the generative model and the inference model, the gradients of the generative model flow through p(x|z) and p(z|y). The gradients of the inference model flow through q(y|z) that ensure that all the modes of the mixture distribution are well separated.
Hopes this helps.
________________________________
From: xuaiyishen2012 ***@***.***>
Sent: Monday, July 26, 2021 6:41 AM
To: jumpynitro/MPCC ***@***.***>
Cc: jumpynitro ***@***.***>; Comment ***@***.***>
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!
In the code, I guess
def obtain_latent_from_z_y_gmm(self, z, y):
mu = self.mu_c[y.view(-1).long()]
log_var = self.lv_c[y.view(-1).long()]
std = self.my_transform_lv(log_var, self.sigma)
z_samples = mu.addcmul(std, z) #z_samples=mu+std*z(对应元素相乘)
return z_samples
this part is the reparameter trick, but which part reflects the update y?
------------------&nbsp;原始邮件&nbsp;------------------
发件人: "jumpynitro/MPCC" ***@***.***&gt;;
发送时间:&nbsp;2021年7月23日(星期五) 凌晨2:02
***@***.***&gt;;
***@***.******@***.***&gt;;
主题:&nbsp;Re: [jumpynitro/MPCC] TypeError (#3)
Yes (you can see that in the code for more details). q(y|z) can be either a neural network or simply a cluster membership, since we use the reparameterization trick the gradients can flow through z.
Hopes this helps.
________________________________
From: xuaiyishen2012 ***@***.***&gt;
Sent: Thursday, July 22, 2021 9:16 AM
To: jumpynitro/MPCC ***@***.***&gt;
Cc: jumpynitro ***@***.***&gt;; Comment ***@***.***&gt;
Subject: Re: [jumpynitro/MPCC] TypeError (#3)
Hello!
I also have questions about the Cluster membership part in the&amp;nbsp;Diagram of the MPCC model, is this a network? When you obtain a z, you update y through this network?
------------------&amp;nbsp;原始邮件&amp;nbsp;------------------
发件人: "jumpynitro/MPCC" ***@***.***&amp;gt;;
发送时间:&amp;nbsp;2021年5月2日(星期天) 凌晨0:28
***@***.***&amp;gt;;
***@***.******@***.***&amp;gt;;
主题:&amp;nbsp;Re: [jumpynitro/MPCC] TypeError (#3)
I fixed the bug. Thank you very much for noticing the error. I only used that part of the code it in the begining weeks of exploration, it may have some mistakes. Feel free to ask If you encounter any other problem.
Greetings.
D
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
D
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)&gt;, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVMCBLQNZ5RRWRKN6YWUWDTZAKZRANCNFSM43ZWB3SQ&gt;.
―
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVMCBPTSPJTLJYCSMHHRQLTZU3VXANCNFSM43ZWB3SQ>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hello!
I am facing this problem:
TypeError: sample() got an unexpected keyword argument 'z_'
Looking forward to your reply. Thanks!
Best wishes!
The text was updated successfully, but these errors were encountered: