-
Notifications
You must be signed in to change notification settings - Fork 16
Adding supporting code for blog post #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
function layer = fourierLayer(tWidth,numModes,args) | ||
|
||
arguments | ||
tWidth | ||
numModes | ||
args.Name = "" | ||
end | ||
name = args.Name; | ||
|
||
net = dlnetwork; | ||
|
||
layers = [ | ||
identityLayer(Name="in") | ||
spectralConvolution1dLayer(tWidth,numModes,Name="specConv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer the arguments here to be the other way around, fourierLayer(numModes, tWidth)
and spectralConvolution1dLayer(numModes, tWidth)
. I think that has a better analogy to convolution1dLayer(filterSize, numFilters)
.
The numFilters
and tWidth
are analogous in that they control some hidden size of some linear operation with the weights. The numModes
and filterSize
are analogous in that they control the size/resolution of the convolution filter in some sense, and both can have N entries for an N-d conv or spectral conv.
@@ -0,0 +1,97 @@ | |||
classdef spectralConvolution1dLayer < nnet.layer.Layer ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect we could use the same version here and in the 1d FNO example - maybe we should consider a directory of shared tools for the examples.
That's something we'll have to look into in future I think, not something to try deal with in this PR.
@@ -0,0 +1,32 @@ | |||
# Physics Informed Machine Learning Methods and Implementation supporting code | |||
This repository provides examples demonstrating a variety of Physics-Informed Machine Learning (PhiML) techniques, applied to a simple pendulum system. The examples provided here are discussed in detail in the accompanying blog post "Physics-Informed Machine Learning: Methods and Implementation". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not "repository" here since this is being added as part of the wider examples repository.
Supporting code for the blog post Physics-Informed Machine Learning: Methods and Implementation