add thres
Browse files- .idea/workspace.xml +1 -2
- src/moe_model.py +2 -0
.idea/workspace.xml
CHANGED
|
@@ -6,7 +6,6 @@
|
|
| 6 |
<component name="ChangeListManager">
|
| 7 |
<list default="true" id="23565123-73ab-4f40-a9ef-1086e0c9e1ec" name="Changes" comment="">
|
| 8 |
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
| 9 |
-
<change beforePath="$PROJECT_DIR$/script.py" beforeDir="false" afterPath="$PROJECT_DIR$/script.py" afterDir="false" />
|
| 10 |
<change beforePath="$PROJECT_DIR$/src/moe_model.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/moe_model.py" afterDir="false" />
|
| 11 |
</list>
|
| 12 |
<option name="SHOW_DIALOG" value="false" />
|
|
@@ -137,7 +136,7 @@
|
|
| 137 |
<workItem from="1743062628099" duration="35000" />
|
| 138 |
<workItem from="1743063082652" duration="7000" />
|
| 139 |
<workItem from="1743092790258" duration="1395000" />
|
| 140 |
-
<workItem from="1743151940209" duration="
|
| 141 |
</task>
|
| 142 |
<servers />
|
| 143 |
</component>
|
|
|
|
| 6 |
<component name="ChangeListManager">
|
| 7 |
<list default="true" id="23565123-73ab-4f40-a9ef-1086e0c9e1ec" name="Changes" comment="">
|
| 8 |
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
|
|
|
| 9 |
<change beforePath="$PROJECT_DIR$/src/moe_model.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/moe_model.py" afterDir="false" />
|
| 10 |
</list>
|
| 11 |
<option name="SHOW_DIALOG" value="false" />
|
|
|
|
| 136 |
<workItem from="1743062628099" duration="35000" />
|
| 137 |
<workItem from="1743063082652" duration="7000" />
|
| 138 |
<workItem from="1743092790258" duration="1395000" />
|
| 139 |
+
<workItem from="1743151940209" duration="1035000" />
|
| 140 |
</task>
|
| 141 |
<servers />
|
| 142 |
</component>
|
src/moe_model.py
CHANGED
|
@@ -62,6 +62,8 @@ class MOE_attention(nn.Module):
|
|
| 62 |
def __init__(self, experts, device, input_dim=128, freezing=False):
|
| 63 |
super(MOE_attention, self).__init__()
|
| 64 |
|
|
|
|
|
|
|
| 65 |
self.device = device
|
| 66 |
self.experts = nn.ModuleList(experts)
|
| 67 |
self.num_experts = len(experts)
|
|
|
|
| 62 |
def __init__(self, experts, device, input_dim=128, freezing=False):
|
| 63 |
super(MOE_attention, self).__init__()
|
| 64 |
|
| 65 |
+
self.threshold = 0.4
|
| 66 |
+
|
| 67 |
self.device = device
|
| 68 |
self.experts = nn.ModuleList(experts)
|
| 69 |
self.num_experts = len(experts)
|