运行官网提供的代码时出现Failed to save model graph, error: ''是为什么啊
import paddle import paddle.nn as nn import paddle.nn.functional as F
from visualdl import LogWriter
class MyNet(nn.Layer): def init(self): super(MyNet, self).init() self.conv1 = nn.Conv2D( in_channels=1, out_channels=20, kernel_size=5, stride=1, padding=2) self.max_pool1 = nn.MaxPool2D(kernel_size=2, stride=2) self.conv2 = nn.Conv2D( in_channels=20, out_channels=20, kernel_size=5, stride=1, padding=2) self.max_pool2 = nn.MaxPool2D(kernel_size=2, stride=2) self.fc = nn.Linear(in_features=980, out_features=10)
def forward(self, inputs):
x = self.conv1(inputs)
x = F.relu(x)
x = self.max_pool1(x)
x = self.conv2(x)
x = F.relu(x)
x = self.max_pool2(x)
x = paddle.reshape(x, [x.shape[0], -1])
x = self.fc(x)
return x
net = MyNet() with LogWriter(logdir="./log/graph_test/") as writer: writer.add_graph( model=net, input_spec=[paddle.static.InputSpec([-1, 1, 28, 28], 'float32')], verbose=True)
Failed to save model graph, error: ''是怎么回事
你好,能提供一下运行环境信息吗,你的Paddle版本和VisualDL版本分别是多少
@rainyfly 你好,我遇到了同样的问题,Windows,paddle-gpu2.2.2,visualdl2.4.1
抱歉哈,可能是我们windows环境下的支持目前出问题了,看看升级一下版本能不能使用,我这周会找个机器进行测试解决一下看看
@rainyfly paddle升级到2.3.2还是不能用,aistudio上2.3.2就可以用