examples/dcgan/dcgan.rb in ruby-dnn-0.12.4 vs examples/dcgan/dcgan.rb in ruby-dnn-0.13.0

- old
+ new

@@ -66,12 +66,16 @@ @l5 = Dense.new(1024) @l6 = Dense.new(1) end def call(x, trainable = true) - has_param_layers.each do |layer| - layer.trainable = trainable - end + @l1.trainable = trainable + @l2.trainable = trainable + @l3.trainable = trainable + @l4.trainable = trainable + @l5.trainable = trainable + @l6.trainable = trainable + x = InputLayer.new([28, 28, 1]).(x) x = @l1.(x) x = LeakyReLU.(x, 0.2) x = @l2.(x)