使用名为Independent的API的问题。
I am using --
Chainer: 5.4.0
NumPy: 1.15.4
CuPy:
CuPy Version : 5.4.0
CUDA Root : /usr/local/cuda-10.0
CUDA Build Version : 10000
CUDA Driver Version : 10010
CUDA Runtime Version : 10000
cuDNN Build Version : 7401
cuDNN Version : 7401
NCCL Build Version : 2307
NCCL Runtime Version : 2307
iDeep: 2.0.0.post3
Chainer.distribution- Class Independent中的5.4.0版本是否被删除?
尽管要求独立类,但我还是尝试直接使用分发类。
我正在使用以下链接模型。 VAE Network
我没有使用Binary数据集,而是根据自己的自定义数据集进行了更改。
chainer/network.py in forward(self, x)
22
23 def forward(self, x):
---> 24 q_z = self.encoder(x)
25 z = q_z.sample(self.k)
26 p_x = self.decoder(z)
~/anaconda3/envs/chainer_p36/lib/python3.6/site-packages/chainer/link.py in __call__(self, *args, **kwargs)
240 if forward is None:
241 forward = self.forward
--> 242 out = forward(*args, **kwargs)
243
244 # Call forward_postprocess hook
chainer/network.py in forward(self, x)
50 mu = self.mu(h)
51 ln_sigma = self.ln_sigma(h) # log(sigma)
---> 52 return D.Independent(D.Normal(loc=mu, log_scale=ln_sigma))
53
54
AttributeError:模块'chainer.distributions'没有属性'Independent'
答案 0 :(得分:1)
Sub InsertPageBreak()
ActiveDocument.Range.Select
Do
With Selection.Find
.Text = "#PAGEBREAK#"
.Execute
End With
If Selection.Find.Found Then
Selection.GoTo What:=wdGoToBookmark, Name:="\Page"
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.InsertBreak Type:=wdPageBreak
Else: Exit Sub
End If
Loop
End Sub
是Chainer v6.0.0中引入的新功能。您需要更新Chainer。