当前位置: 首页>>代码示例>>Python>>正文


Python FullyConnectedLayer.reshape方法代码示例

本文整理汇总了Python中cle.cle.layers.feedforward.FullyConnectedLayer.reshape方法的典型用法代码示例。如果您正苦于以下问题:Python FullyConnectedLayer.reshape方法的具体用法?Python FullyConnectedLayer.reshape怎么用?Python FullyConnectedLayer.reshape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cle.cle.layers.feedforward.FullyConnectedLayer的用法示例。


在下文中一共展示了FullyConnectedLayer.reshape方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: concatenate

# 需要导入模块: from cle.cle.layers.feedforward import FullyConnectedLayer [as 别名]
# 或者: from cle.cle.layers.feedforward.FullyConnectedLayer import reshape [as 别名]
    k.default_update = v

shared_updates[rnn_tm1] = s_temp[-1]
s_temp = concatenate([s_0[None, :, :], s_temp[:-1]], axis=0)
theta_1_temp = theta_1.fprop([s_temp], params)
theta_2_temp = theta_2.fprop([theta_1_temp], params)
theta_3_temp = theta_3.fprop([theta_2_temp], params)
theta_4_temp = theta_4.fprop([theta_3_temp], params)
theta_mu_temp = theta_mu.fprop([theta_4_temp], params)
theta_sig_temp = theta_sig.fprop([theta_4_temp], params)
coeff_temp = coeff.fprop([theta_4_temp])

x_in = x.reshape((x.shape[0]*x.shape[1], -1))
theta_mu_in = theta_mu_temp.reshape((x.shape[0]*x.shape[1], -1))
theta_sig_in = theta_sig_temp.reshape((x.shape[0]*x.shape[1], -1))
coeff_in = coeff.reshape((x.shape[0]*x.shape[1], -1))

recon = GMM(x_temp, theta_mu_temp, theta_sig_temp, coeff_temp)
#recon = GMM(x_in, theta_mu_in, theta_sig_in, coeff_in)
recon = recon.reshape((x_shape[0], x_shape[1]))
recon_term = recon.mean()
recon_term.name = 'nll'

m_s_0 = rnn.get_init_state(m_batch_size)

(m_s_temp, m_updates) = theano.scan(fn=inner_fn,
                                    sequences=[x_4_temp],
                                    outputs_info=[m_s_0])

for k, v in m_updates.iteritems():
    k.default_update = v
开发者ID:LEONOB2014,项目名称:nips2015_vrnn,代码行数:33,代码来源:rnn_gmm.py


注:本文中的cle.cle.layers.feedforward.FullyConnectedLayer.reshape方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。