risk managment
This commit is contained in:
@ -303,13 +303,15 @@ class EnhancedCNNModel(nn.Module):
|
||||
batch_size, seq_len, features = x.shape
|
||||
|
||||
# Reshape for processing: [batch, seq, features] -> [batch*seq, features]
|
||||
x_reshaped = x.view(-1, features)
|
||||
x_reshaped = x.reshape(-1, features)
|
||||
x_reshaped = self._memory_barrier(x_reshaped)
|
||||
|
||||
# Input embedding
|
||||
embedded = self.input_embedding(x_reshaped) # [batch*seq, base_channels]
|
||||
embedded = self._memory_barrier(embedded)
|
||||
|
||||
# Reshape back for conv1d: [batch*seq, channels] -> [batch, channels, seq]
|
||||
embedded = embedded.view(batch_size, seq_len, -1).transpose(1, 2)
|
||||
embedded = embedded.reshape(batch_size, seq_len, -1).transpose(1, 2).contiguous()
|
||||
|
||||
# Multi-scale feature extraction
|
||||
path1 = self.conv_path1(embedded)
|
||||
|
Reference in New Issue
Block a user