schola.scripts.common.ActivationFunctionEnum
Class Definition
class schola.scripts.common.ActivationFunctionEnum(value)
Bases: str
, Enum
Activation functions for neural networks. Corresponding torch class is embedded in the layer attribute.
Parameters
value
Attributes
ReLU
Type: Tuple[str, ReLU]
Value: 'relu'
Rectified Linear Unit activation function.
Sigmoid
Type: Tuple[str, Sigmoid]
Value: 'sigmoid'
Sigmoid activation function.
TanH
Type: Tuple[str, Tanh]
Value: 'tanh'
Hyperbolic Tangent activation function.
Methods
capitalize
capitalize()
Return a capitalized version of the string.
casefold
casefold()
Return a version of the string suitable for caseless comparisons.
center
center(width, fillchar)
Return a centered string of length width.
count
count(sub, start, end)
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
encode
encode(encoding, errors)
Encode the string using the codec registered for encoding.
endswith
endswith(suffix, start, end)
Return True if S ends with the specified suffix, False otherwise.
expandtabs
expandtabs(tabsize)
Return a copy where all tab characters are expanded using spaces.
find
find(sub, start, end)
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
format
format(*args, **kwargs)
Return a formatted version of S, using substitutions from args and kwargs.
format_map
format_map(mapping)
Return a formatted version of S, using substitutions from mapping.
index
index(sub, start, end)
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
isalnum
isalnum()
Return True if the string is an alpha-numeric string, False otherwise.
isalpha
isalpha()
Return True if the string is an alphabetic string, False otherwise.
isascii
isascii()
Return True if all characters in the string are ASCII, False otherwise.
isdecimal
isdecimal()
Return True if the string is a decimal string, False otherwise.
isdigit
isdigit()
Return True if the string is a digit string, False otherwise.
isidentifier
isidentifier()
Return True if the string is a valid Python identifier, False otherwise.
islower
islower()
Return True if the string is a lowercase string, False otherwise.
isnumeric
isnumeric()
Return True if the string is a numeric string, False otherwise.
isprintable
isprintable()
Return True if the string is printable, False otherwise.
isspace
isspace()
Return True if the string is a whitespace string, False otherwise.
istitle
istitle()
Return True if the string is a title-cased string, False otherwise.
isupper
isupper()
Return True if the string is an uppercase string, False otherwise.
join
join(iterable, /)
Concatenate any number of strings.
ljust
ljust(width, fillchar)
Return a left-justified string of length width.
lower
lower()
Return a copy of the string converted to lowercase.
lstrip
lstrip(chars)
Return a copy of the string with leading whitespace removed.
maketrans
Return a translation table usable for str.translate().
partition
partition(sep, /)
Partition the string into three parts using the given separator.
removeprefix
removeprefix(prefix, /)
Return a str with the given prefix string removed if present.
removesuffix
removesuffix(suffix, /)
Return a str with the given suffix string removed if present.
replace
replace(old, new, count)
Return a copy with all occurrences of substring old replaced by new.
rfind
rfind(sub, start, end)
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
rindex
rindex(sub, start, end)
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
rjust
rjust(width, fillchar)
Return a right-justified string of length width.
rpartition
rpartition(sep, /)
Partition the string into three parts using the given separator.
rsplit
rsplit(sep, maxsplit)
Return a list of the words in the string, using sep as the delimiter string.
rstrip
rstrip(chars)
Return a copy of the string with trailing whitespace removed.
split
split(sep, maxsplit)
Return a list of the words in the string, using sep as the delimiter string.
splitlines
splitlines(keepends)
Return a list of the lines in the string, breaking at line boundaries.
startswith
startswith(prefix, start, end)
Return True if S starts with the specified prefix, False otherwise.
strip
strip(chars)
Return a copy of the string with leading and trailing whitespace removed.
swapcase
swapcase()
Convert uppercase characters to lowercase and lowercase characters to uppercase.
title
title()
Return a version of the string where each word is titlecased.
translate
translate(table, /)
Replace each character in the string using the given translation table.
upper
upper()
Return a copy of the string converted to uppercase.
zfill
zfill(width, /)
Pad a numeric string with zeros on the left, to fill a field of the given width.