RAD

Class which is used to implement residule-based adaptive distribution

RAD

Bases: adaptives

Class which implements stategy to call Residule-based Adaptive Refinement, based on A comprehensive study of non-adaptive and residual-based adaptive sampling for physics-informed neural networks

__init__(frequency, k=2, c=1, samplefactor=3)

Parameters:
  • frequency (int) –

    How many epochs between sampling new collocation points.

  • k (int, default: 2 ) –

    Hyperparameter which affects sampling. Please see paper here

  • c (int, default: 1 ) –

    Hyperparameter which affects sampling. Please see cited paper here

  • samplefactor (int, default: 3 ) –

    Factor of number of collocation points to sample to choose new distribution from.

get_frequency()

Returns:
  • int

    How many epochs between sampling new collocation points.

get_k()

Returns:
  • int

    K value used

get_c()

Returns:
  • int

    C value used

get_samplefactor()

Returns:
  • int

    Factor of number of collocation points to sample to choose new distribution from.

AdaptiveStrategy(model, domain, data, clps, ds_data, ds, i)

Sampling stategy to call Residule-based Adaptive Distribtuion.

Parameters:
  • model (network) –

    Tensorflow network.

  • domain (domain) –

    Domain class solving over.

  • data (data) –

    Data class solving with.

  • clps (tensor) –

    Current collocation points.

  • ds_data (list) –

    Data being packaged in training routine.

  • ds (list) –

    Current ds value of training routine.

  • i (int) –

    Iteration number.