d795f811eb13a20e18aa30c435cef0ad99e830ea,examples/plot_unet_tutorial.py,,,#,127

Before Change


    return trainer


trainer = train_model(model=model_a, loaders=[train_loader, validate_loader], save_dir="model_a")



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Prediction
// ----------------------------
// The trainer contains the trained model and we can do predictions.
// We use :code:`unwrap` to convert the results to numpy arrays.
trainer.eval_mode()
from inferno.utils.torch_utils import unwrap


for image, target in test_loader:

    // transfer image to gpu
    image = image.cuda() if USE_CUDA else image

    // get batch size from image
    batch_size = image.size()[0]
    
    prediction = trainer.apply_model(image)

    image = unwrap(image,      as_numpy=True, to_cpu=True)
    prediction = unwrap(prediction, as_numpy=True, to_cpu=True)


    fig = pylab.figure()

After Change


    ax.set_title("ground truth")
    break
fig.tight_layout()
plt.show()


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Simple UNet
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: inferno-pytorch/inferno
Commit Name: d795f811eb13a20e18aa30c435cef0ad99e830ea
Time: 2018-08-10
Author: thorsten.beier@iwr.uni-heidelberg.de
File Name: examples/plot_unet_tutorial.py
Class Name:
Method Name:


Project Name: matplotlib/matplotlib
Commit Name: 64ac509a6cec89592c6140eebcd9058cb87044f0
Time: 2019-02-13
Author: elch.rz@ruetz-online.de
File Name: examples/statistics/barchart_demo.py
Class Name:
Method Name:


Project Name: biolab/orange3
Commit Name: cacf02bec34b7b1dd7eb46137d722ca2ae5e25f3
Time: 2015-08-31
Author: tomaz.hocevar@fri.uni-lj.si
File Name: Orange/widgets/data/owrank.py
Class Name:
Method Name: