Tensorflow2 (1) 썸네일형 리스트형 An example of custom loss using model internals - Tensorflow version : 2.4.0 rc1 - Colab notebook: colab.research.google.com/drive/1Hwi6auz2meKvD0ogdDSywb2E4_J1F9S_?usp=sharing import tensorflow as tf from tensorflow import keras • Create a custom layer calculating and adding custom loss: class ReconLoss(keras.layers.Layer): def __init__(self, **kwargs): super().__init__(**kwargs) def call(self, inputs): x, reconstruction = inputs recon_loss .. 이전 1 다음