小编Kag*_*San的帖子

Why there are different output between model.forward(input) and model(input)

I'm using pytorch to build a simple model like VGG16,and I have overloaded the function forward in my model.

I found everyone tends to use model(input) to get the output rather than model.forward(input), and I am interested in the difference between them. I try to input the same data, but the result is different. I'm confused.

I have output the layer_weight before I input data, the weight not be changed, and I know when we using model(input) it using …

model forward pytorch

3
推荐指数
1
解决办法
418
查看次数

标签 统计

forward ×1

model ×1

pytorch ×1