Skip to content

Commit

Permalink
fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kayzliu committed Oct 7, 2023
1 parent 1ab3a89 commit 86b63b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pygod/detector/gae.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def init_model(self, **kwargs):
recon_s=self.recon_s,
sigmoid_s=self.sigmoid_s,
backbone=self.backbone,
**kwargs)
**kwargs).to(self.device)

def forward_model(self, data):

Expand Down
8 changes: 4 additions & 4 deletions pygod/nn/functional.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
"""Funtional Interface for PyGOD"""
"""Functional Interface for PyGOD"""
# Author: Kay Liu <zliu234@uic.edu>
# License: BSD 2 clause

Expand All @@ -24,14 +24,14 @@ def double_recon_loss(x,
The first dimension is kept for outlier scores of each node.
For feature reconstruction, we use mean squared error loss:
:math:`\symbf{E_a} = \|\symbf{X}-\symbf{X}'\odot H\|`,
:math:`\symbf{E_a} = \|\symbf{X}-\symbf{X}'\|\odot H`,
where :math:`H=\begin{cases}1 - \eta &
\text{if }x_{ij}=0\\ \eta & \text{if }x_{ij}>0\end{cases}`, and
:math:`\eta` is the positive weight for feature.
For structure reconstruction, we use mean squared error loss by
default: :math:`\symbf{E_s} = \|\symbf{S}-\symbf{S}'\odot
\Theta\|`, where :math:`\Theta=\begin{cases}1 -
default: :math:`\symbf{E_s} = \|\symbf{S}-\symbf{S}'\|\odot
\Theta`, where :math:`\Theta=\begin{cases}1 -
\theta & \text{if }s_{ij}=0\\ \theta & \text{if }s_{ij}>0
\end{cases}`, and :math:`\theta` is the positive weight for
structure. Alternatively, we can use binary cross entropy loss
Expand Down

0 comments on commit 86b63b6

Please sign in to comment.