[Resolved]Variable construction at test time

I have a network that has been trained on data (the input data is converted to a torch Variable so that gradients are kept track of). At test time, given new data, can I send it as a torch tensor (instead of a variable, since I don’t need to keep track of gradients) to the network?

At test time it still needs to be a variable but you can set volatile=True (see here) to use the graph in inference mode and keep it from saving history.

1 Like