How to add bias variable in Keras with functional api without subclassing?

前端 未结 0 821
情书的邮戳
情书的邮戳 2021-02-13 02:40

I tried the following approaches:

import tensorflow as tf
inp = tf.keras.Input(shape=(None,))

# first approach:
bias = tf.Variable(0., shape=(), trainable=True)          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题