Skip to content

Commit

Permalink
fix(merge conflicts)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbuild3r committed Dec 5, 2022
2 parents e1fae3c + 4f87cf6 commit a999889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/graph/model.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::node::*;
use super::utilities::scale_to_multiplier;
use crate::abort;
use crate::circuit::eltwise::{DivideBy, EltwiseConfig, EltwiseTable, ReLu, Sigmoid};
use crate::circuit::eltwise::{DivideBy, EltwiseConfig, EltwiseTable, LeakyReLU, ReLU, Sigmoid};
use crate::circuit::fused::*;
use crate::circuit::range::*;
use crate::commands::{model_path, Cli, Commands};
Expand Down Expand Up @@ -36,12 +36,12 @@ pub enum Mode {
}

enum TableTypes<F: FieldExt + TensorType> {
ReLu(Rc<RefCell<EltwiseTable<F, ReLu<F>>>>),
ReLu(Rc<RefCell<EltwiseTable<F, ReLU<F>>>>),
DivideBy(Rc<RefCell<EltwiseTable<F, DivideBy<F>>>>),
Sigmoid(Rc<RefCell<EltwiseTable<F, Sigmoid<F>>>>),
}
impl<F: FieldExt + TensorType> TableTypes<F> {
fn get_relu(&self) -> Rc<RefCell<EltwiseTable<F, ReLu<F>>>> {
fn get_relu(&self) -> Rc<RefCell<EltwiseTable<F, ReLU<F>>>> {
match self {
TableTypes::ReLu(inner) => inner.clone(),
_ => {
Expand Down Expand Up @@ -446,7 +446,7 @@ impl Model {
match &node.opkind {
OpKind::Div(s) => {
if tables.contains_key(&node.opkind) {
let table = tables.get(&node.opkind).unwrap().clone();
let table = tables.get(&node.opkind).unwrap();
let conf: EltwiseConfig<F, DivideBy<F>> =
EltwiseConfig::configure_with_table(meta, input, output, table.get_div());
NodeConfigTypes::Divide(conf, node_inputs)
Expand Down Expand Up @@ -474,7 +474,7 @@ impl Model {
}
OpKind::Sigmoid(s) => {
if tables.contains_key(&node.opkind) {
let table = tables.get(&node.opkind).unwrap().clone();
let table = tables.get(&node.opkind).unwrap();
let conf: EltwiseConfig<F, Sigmoid<F>> =
EltwiseConfig::configure_with_table(meta, input, output, table.get_sig());
NodeConfigTypes::Sigmoid(conf, node_inputs)
Expand Down
2 changes: 1 addition & 1 deletion src/graph/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ impl Node {
}
OpKind::LeakyReLU(_) => {
let input_node = &inputs[0];
mn.in_dims = input_node.out_dims.clone();
mn.in_dims = input_node.in_dims.clone();
mn.out_dims = input_node.out_dims.clone();
mn.output_max = input_node.output_max;
mn.in_scale = input_node.out_scale;
Expand Down

0 comments on commit a999889

Please sign in to comment.