ML ที่ยืดหยุ่นควบคุมและตีความได้ด้วยโมเดลที่ใช้ตาข่าย
import numpy as np import tensorflow as tf import tensorflow_lattice as tfl model = tf.keras.models.Sequential() model.add( tfl.layers.ParallelCombination([ # Monotonic piece-wise linear calibration with bounded output tfl.layers.PWLCalibration( monotonicity='increasing', input_keypoints=np.linspace(1., 5., num=20), output_min=0.0, output_max=1.0), # Diminishing returns tfl.layers.PWLCalibration( monotonicity='increasing', convexity='concave', input_keypoints=np.linspace(0., 200., num=20), output_min=0.0, output_max=2.0), # Partially monotonic categorical calibration: calib(0) <= calib(1) tfl.layers.CategoricalCalibration( num_buckets=4, output_min=0.0, output_max=1.0, monotonicities=[(0, 1)]), ])) model.add( tfl.layers.Lattice( lattice_sizes=[2, 3, 2], monotonicities=['increasing', 'increasing', 'increasing'], # Trust: model is more responsive to input 0 if input 1 increases edgeworth_trusts=(0, 1, 'positive'))) model.compile(...)
TensorFlow Lattice เป็นไลบรารีที่ใช้โมเดลตาข่ายที่ จำกัด และตีความได้ ไลบรารีช่วยให้คุณสามารถฉีดความรู้โดเมนเข้าสู่กระบวนการเรียนรู้ผ่านสามัญสำนึกหรือ ข้อ จำกัด ด้านรูปร่างที่ ขับเคลื่อนด้วยนโยบาย สิ่งนี้ทำได้โดยใช้คอลเลกชันของ เลเยอร์ Keras ที่สามารถตอบสนองข้อ จำกัด ต่างๆเช่น monotonicity ความนูนและลักษณะการโต้ตอบ นอกจากนี้ห้องสมุดยังมี แบบจำลอง สำเร็จรูป และเครื่องมือ ประมาณค่าสำเร็จรูป
ด้วย TF Lattice คุณสามารถใช้ความรู้เกี่ยวกับโดเมนเพื่อคาดการณ์ส่วนต่างๆของพื้นที่ป้อนข้อมูลที่ไม่ครอบคลุมโดยชุดข้อมูลการฝึกอบรม ซึ่งจะช่วยหลีกเลี่ยงพฤติกรรมของโมเดลที่ไม่คาดคิดเมื่อการกระจายการแสดงผลแตกต่างจากการกระจายการฝึกอบรม
