Home / Class/ gate_count Class — pytorch Architecture

gate_count Class — pytorch Architecture

Architecture documentation for the gate_count class in RNN.cpp from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/RNN.cpp lines 698–704

template<int64_t gate_count>
inline void check_rnn_cell_forward_weights(const Tensor& w_ih, const Tensor& w_hh, const c10::SymInt& hidden_size){
    TORCH_CHECK(w_ih.size(0) == gate_count * hidden_size, "weight_ih first dim must be ", gate_count, " * hidden_size = ",
        gate_count * hidden_size, ", but got ", w_ih.size(0));
    TORCH_CHECK(w_hh.size(0) == gate_count * hidden_size, "weight_hh first dim must be ", gate_count, " * hidden_size = ",
        gate_count * hidden_size, ", but got ", w_hh.size(0));
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free