From 22f562fc98d4fc124a55ec802dc5e50af5d21914 Mon Sep 17 00:00:00 2001 From: Nero Blackstone Date: Thu, 20 Jun 2024 22:57:22 +0800 Subject: [PATCH] remove isnothing --- src/layers/recurrent.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layers/recurrent.jl b/src/layers/recurrent.jl index 04182ebb26..8db8fec08f 100644 --- a/src/layers/recurrent.jl +++ b/src/layers/recurrent.jl @@ -693,7 +693,7 @@ function BidirectionalRNN(cell::AbstractRecurrentCell; merge_mode::Union{Function, Nothing}=vcat, ordering::AbstractTimeSeriesDataBatchOrdering=BatchLastIndex()) layer = Recurrence(cell; return_sequence=true, ordering) - backward_rnn_layer = isnothing(backward_cell) ? layer : + backward_rnn_layer = backward_cell=== nothing ? layer : Recurrence(backward_cell; return_sequence=true, ordering) fuse_op = merge_mode === nothing ? nothing : Broadcast.BroadcastFunction(merge_mode) return BidirectionalRNN(Parallel(