Skip to content

Commit

Permalink
Add regression tests covering activation functions
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderhe committed Oct 15, 2021
1 parent 94fe759 commit 6bcdcc2
Show file tree
Hide file tree
Showing 10 changed files with 220 additions and 0 deletions.
Binary file not shown.
54 changes: 54 additions & 0 deletions test/prog/fortnet/input/activation/arctan/fortnet_in.hsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Network = BPNN {

Hidden = 2 2
Activation = 'atan'

}

Features {

Mapping = ACSF {
Reduce = No
Standardization = Yes
Function = Auto {
AtomID = 0
RCut = 4.0
NRadial = 5
NAngular = 4
}
}

}

Training = SD {

Threshold = 1e-20
NIterations = 1
NPrintout = 1
NSaveNet = 1
MinDisplacement = 1e-10
MaxDisplacement = 5e-01
LearningRate = 0.001
Loss = 'mse'

Shuffle = No

}

Data {

Dataset = '../../../datasets/fnetdata_oh_c_global.hdf5'
Validset = '../../../datasets/fnetdata_oh_c_global.hdf5'
NetstatFile = 'fortnet.hdf5'

}

Options {

ReadNetStats = No
Mode = 'train'

RandomSeed = 123456
WriteIterationTrajectory = No

}
Binary file not shown.
54 changes: 54 additions & 0 deletions test/prog/fortnet/input/activation/bent/fortnet_in.hsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Network = BPNN {

Hidden = 2 2
Activation = 'bent'

}

Features {

Mapping = ACSF {
Reduce = No
Standardization = Yes
Function = Auto {
AtomID = 0
RCut = 4.0
NRadial = 5
NAngular = 4
}
}

}

Training = SD {

Threshold = 1e-20
NIterations = 1
NPrintout = 1
NSaveNet = 1
MinDisplacement = 1e-10
MaxDisplacement = 5e-01
LearningRate = 0.001
Loss = 'mse'

Shuffle = No

}

Data {

Dataset = '../../../datasets/fnetdata_oh_c_global.hdf5'
Validset = '../../../datasets/fnetdata_oh_c_global.hdf5'
NetstatFile = 'fortnet.hdf5'

}

Options {

ReadNetStats = No
Mode = 'train'

RandomSeed = 123456
WriteIterationTrajectory = No

}
Binary file not shown.
54 changes: 54 additions & 0 deletions test/prog/fortnet/input/activation/lrelu/fortnet_in.hsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Network = BPNN {

Hidden = 2 2
Activation = 'lrelu'

}

Features {

Mapping = ACSF {
Reduce = No
Standardization = Yes
Function = Auto {
AtomID = 0
RCut = 4.0
NRadial = 5
NAngular = 4
}
}

}

Training = SD {

Threshold = 1e-20
NIterations = 1
NPrintout = 1
NSaveNet = 1
MinDisplacement = 1e-10
MaxDisplacement = 5e-01
LearningRate = 0.001
Loss = 'mse'

Shuffle = No

}

Data {

Dataset = '../../../datasets/fnetdata_oh_c_global.hdf5'
Validset = '../../../datasets/fnetdata_oh_c_global.hdf5'
NetstatFile = 'fortnet.hdf5'

}

Options {

ReadNetStats = No
Mode = 'train'

RandomSeed = 123456
WriteIterationTrajectory = No

}
Binary file modified test/prog/fortnet/input/activation/relu/_fortnet.hdf5
Binary file not shown.
Binary file not shown.
54 changes: 54 additions & 0 deletions test/prog/fortnet/input/activation/softplus/fortnet_in.hsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Network = BPNN {

Hidden = 2 2
Activation = 'softplus'

}

Features {

Mapping = ACSF {
Reduce = No
Standardization = Yes
Function = Auto {
AtomID = 0
RCut = 4.0
NRadial = 5
NAngular = 4
}
}

}

Training = SD {

Threshold = 1e-20
NIterations = 1
NPrintout = 1
NSaveNet = 1
MinDisplacement = 1e-10
MaxDisplacement = 5e-01
LearningRate = 0.001
Loss = 'mse'

Shuffle = No

}

Data {

Dataset = '../../../datasets/fnetdata_oh_c_global.hdf5'
Validset = '../../../datasets/fnetdata_oh_c_global.hdf5'
NetstatFile = 'fortnet.hdf5'

}

Options {

ReadNetStats = No
Mode = 'train'

RandomSeed = 123456
WriteIterationTrajectory = No

}
4 changes: 4 additions & 0 deletions test/prog/fortnet/tests
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ input/acsf/autoandmanual
input/acsf/manual
input/acsf/multiauto

input/activation/arctan
input/activation/bent
input/activation/gaussian
input/activation/heaviside
input/activation/linear
input/activation/lrelu
input/activation/relu
input/activation/sigmoid
input/activation/softplus
input/activation/tanh

input/atomids/speciesResolved
Expand Down

0 comments on commit 6bcdcc2

Please sign in to comment.