Transform model to xxx.proto failed

import torch

def main():
    data=torch.rand(1, 2, 2, 3)
    print("input", data)
    print(data.size())
    model=torch.nn.Upsample((4, 6), mode='bilinear', align_corners=True)
    pre=model(data)
    print("output", pre)
    print(pre.size())
    print("Transform the model to proto")
    torch.onnx.export(model, data, "model.proto", verbose=True)

main()

when I run the code upside, I got the problem as follow:

TypeError: upsample_bilinear2d() got an unexpected keyword argument 'align_corners' (occurred when translating upsample_bilinear2d)

It seems that the function has already updated, the old transform function can not support the new function.
How can I solve this, Thanks.

you have to update pytorch and onnx to lastest version. I sloved it right now!
but it only support ‘align_corners=False’

Thanks lizhengwei1922, I think I have already updated the software to the lastest version with Python 0.4.0 and onnx 1.3.0. But the problem still remains.

Solved with pytorch 0.4.1