Skip to content

Commit

Permalink
added rank attr to log transform layer which is likely to be used as …
Browse files Browse the repository at this point in the history
…an input layer
  • Loading branch information
grantbuster committed Jun 20, 2024
1 parent b5d4893 commit bf052ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions phygnn/layers/custom_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,17 @@ def __init__(self, name=None, adder=0, inverse=False):
super().__init__(name=name)
self.adder = adder
self.inverse = inverse
self.rank = None

def build(self, input_shape):
"""Custom implementation of the tf layer build method.
Parameters
----------
input_shape : tuple
Shape tuple of the input
"""
self.rank = len(input_shape)

def call(self, x):
"""Operates on x with (inverse) log transform
Expand Down

0 comments on commit bf052ab

Please sign in to comment.