Skip to content

Commit 84f8299

Browse files
committed
whenxuan: update the requirements
1 parent fa62d2c commit 84f8299

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

channel_attention/simple_attention.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66

77
class SimpleAttentionModule(torch.nn.Module):
88
"""
9-
A Simple, Parameter-Free Attention Module for Convolutional
9+
A Simple, Parameter-Free Attention Module for Convolutional
1010
Module for Time Series (1D) and Image (2D) Data.
11-
11+
1212
Refernces: "SimAM: A Simple, Parameter-Free Attention Module for Convolutional Neural Networks" by Lingxiao Yang, Ru-Yuan Zhang, et al.
13-
13+
1414
URL: https://proceedings.mlr.press/v139/yang21o.html
1515
"""
16-
17-
def __init__(self, n_dims: int, in_channels: int = None, e_lambda: Optional[float] = 1e-4) -> None:
18-
"""
19-
20-
"""
16+
17+
def __init__(
18+
self, n_dims: int, in_channels: int = None, e_lambda: Optional[float] = 1e-4
19+
) -> None:
20+
""" """
2121
super().__init__()
22-
22+
2323
n_dims = n_dims
2424

2525
self.activaton = nn.Sigmoid()

main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import argparse
2+
import random
3+
import torch

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
torch>=1.7.0
1+
numpy
2+
torch

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
],
3636
python_requires=">=3.6",
3737
install_requires=[
38-
"torch>=1.7.0",
38+
"torch",
39+
"numpy",
3940
],
4041
)

0 commit comments

Comments
 (0)