simulation.utils.machine_learning.models.test package

Submodules

simulation.utils.machine_learning.models.test.test_helper module

Functions:

test_get_norm_layer()

Check if get_norm_layer() returns a valid layer.

test_get_scheduler()

Check if get_scheduler() returns a scheduler.

test_init_weights()

Check if init_weights() runs without errors.

test_set_requires_grad()

Check if set_requires_grad() correctly changes requires_grad.

main()

test_get_norm_layer()[source]

Check if get_norm_layer() returns a valid layer.

test_get_scheduler()[source]

Check if get_scheduler() returns a scheduler.

test_init_weights()[source]

Check if init_weights() runs without errors.

test_set_requires_grad()[source]

Check if set_requires_grad() correctly changes requires_grad.

main()[source]

simulation.utils.machine_learning.models.test.test_resnet_block module

Functions:

test_creating_resnet_block(norm_type, **kwargs)

main()

test_creating_resnet_block(norm_type, **kwargs)[source]
main()[source]

simulation.utils.machine_learning.models.test.test_resnet_generator module

Functions:

test_resnet_generator(norm_type, **kwargs)

main()

test_resnet_generator(norm_type, **kwargs)[source]
main()[source]

simulation.utils.machine_learning.models.test.test_wgan_critic module

Perform some basic tests for the WGAN critic.

Functions:

test_weight_clipping()

test_forward()

test_optimization_step()

Testing very basic functionality of optimizing.

main()

test_weight_clipping()None[source]
test_forward()None[source]
test_optimization_step()[source]

Testing very basic functionality of optimizing.

Testing if the optimization works is hard. Here, some very basic things are tested:

  • Does the wasserstein distance increase when running the optimization?

  • Is the distance close to zero, if random distributions are given

    and the generator is the identity?

  • Is the generator unchanged?

main()[source]

Module contents