pub struct FourierNetworkCodec {
pub fourier_features: NonZeroUsize,
pub fourier_scale: Positive<f64>,
pub num_blocks: NonZeroUsize,
pub learning_rate: Positive<f64>,
pub num_epochs: usize,
pub mini_batch_size: Option<NonZeroUsize>,
pub seed: u64,
pub version: StaticCodecVersion<0, 1, 0>,
}Expand description
Fourier network codec which trains and overfits a fourier feature neural network on encoding and predicts during decoding.
The approach is based on the papers by Tancik et al. 2020 (https://dl.acm.org/doi/abs/10.5555/3495724.3496356) and by Huang and Hoefler 2020 (https://arxiv.org/abs/2210.12538).
Fields§
§fourier_features: NonZeroUsizeThe number of Fourier features that the data coordinates are projected to
fourier_scale: Positive<f64>The standard deviation of the Fourier features
num_blocks: NonZeroUsizeThe number of blocks in the network
learning_rate: Positive<f64>The learning rate for the Adam optimizer
num_epochs: usizeThe number of epochs for which the network is trained
mini_batch_size: Option<NonZeroUsize>The optional mini-batch size used during training
Setting the mini-batch size to None disables the use of batching,
i.e. the network is trained using one large batch that includes the
full data.
seed: u64The seed for the random number generator used during encoding
version: StaticCodecVersion<0, 1, 0>The codec’s encoding format version. Do not provide this parameter explicitly.
Trait Implementations§
Source§impl Clone for FourierNetworkCodec
impl Clone for FourierNetworkCodec
Source§fn clone(&self) -> FourierNetworkCodec
fn clone(&self) -> FourierNetworkCodec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Codec for FourierNetworkCodec
impl Codec for FourierNetworkCodec
Source§fn encode(&self, data: AnyCowArray<'_>) -> Result<AnyArray, Self::Error>
fn encode(&self, data: AnyCowArray<'_>) -> Result<AnyArray, Self::Error>
data and returns the result. Read moreSource§fn decode(&self, _encoded: AnyCowArray<'_>) -> Result<AnyArray, Self::Error>
fn decode(&self, _encoded: AnyCowArray<'_>) -> Result<AnyArray, Self::Error>
encoded data and returns the result. Read moreSource§fn decode_into(
&self,
encoded: AnyArrayView<'_>,
decoded: AnyArrayViewMut<'_>,
) -> Result<(), Self::Error>
fn decode_into( &self, encoded: AnyArrayView<'_>, decoded: AnyArrayViewMut<'_>, ) -> Result<(), Self::Error>
Source§impl<'de> Deserialize<'de> for FourierNetworkCodec
impl<'de> Deserialize<'de> for FourierNetworkCodec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for FourierNetworkCodec
impl JsonSchema for FourierNetworkCodec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for FourierNetworkCodec
impl Serialize for FourierNetworkCodec
Source§impl StaticCodec for FourierNetworkCodec
impl StaticCodec for FourierNetworkCodec
Source§type Config<'de> = FourierNetworkCodec
type Config<'de> = FourierNetworkCodec
Source§fn from_config(config: Self::Config<'_>) -> Self
fn from_config(config: Self::Config<'_>) -> Self
configuration.Source§fn get_config(&self) -> StaticCodecConfig<'_, Self>
fn get_config(&self) -> StaticCodecConfig<'_, Self>
Auto Trait Implementations§
impl Freeze for FourierNetworkCodec
impl RefUnwindSafe for FourierNetworkCodec
impl Send for FourierNetworkCodec
impl Sync for FourierNetworkCodec
impl Unpin for FourierNetworkCodec
impl UnsafeUnpin for FourierNetworkCodec
impl UnwindSafe for FourierNetworkCodec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DynCodec for Twhere
T: StaticCodec,
impl<T> DynCodec for Twhere
T: StaticCodec,
Source§type Type = StaticCodecType<T>
type Type = StaticCodecType<T>
Source§fn get_config<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn get_config<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more