Skip to content
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

请问一个can网络实现的细节 #4

Open
chudouye opened this issue Feb 26, 2021 · 1 comment
Open

请问一个can网络实现的细节 #4

chudouye opened this issue Feb 26, 2021 · 1 comment

Comments

@chudouye
Copy link

chudouye commented Feb 26, 2021

if mode == "can":
        out_seq = []
        hh = []
        for i in range(orders):
            hh.append(his_items**(i+1))
        #hh = [sum(hh)]
        for i, h in enumerate(hh):
            if order_indep:
                weight, bias = weight_orders[i], bias_orders[i]
            else:
                weight, bias = weight_orders[0], bias_orders[0]
            for j, (w, b) in enumerate(zip(weight, bias)):
                h  = tf.matmul(h, w)
                if b is not None:
                    h = h + b
                if j != len(weight)-1:
                    h = tf.nn.tanh(h)
                out_seq.append(h)
        out_seq = tf.concat(out_seq, 2)

此处can的输出相当于包括了mlp每一层的输出,论文中是mlp最后一层的输出,请问应该以哪个为准呢

@wwwangzhch
Copy link

arXiv上最新的论文改成concat了

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

No branches or pull requests

2 participants