There is a newer version of the record available.

Published June 12, 2023 | Version v0.3.8

ASEM000/PyTreeClass: v0.3.8

Authors/Creators

  • 1. KAIST

Description

What's Changed

Example:

Update all leaves starting with weight_


import pytreeclass as pytc

class Tree(pytc.TreeClass):
    weight_1: float = 1.0
    weight_2: float = 2.0
    weight_3: float = 3.0
    bias: float = 0.0

tree = Tree()

tree.at[pytc.RegexKey(r"weight_.*")].set(100.0)
# Tree(weight_1=100.0, weight_2=100.0, weight_3=100.0, bias=0.0)

Full Changelog: https://github.com/ASEM000/PyTreeClass/compare/v0.3.7...v0.3.8

Files

ASEM000/PyTreeClass-v0.3.8.zip

Files (342.7 kB)

Name Size Download all
md5:73c850aec82257070709e7666eeaa471
342.7 kB Preview Download

Additional details

Related works