Spaces:
Sleeping
Sleeping
Mehmet Batuhan Duman
commited on
Commit
·
e9be013
1
Parent(s):
ba85e8c
Added new model
Browse files- .idea/workspace.xml +13 -1
- app.py +17 -13
- modelc1.pth +3 -0
- models1.pth +3 -0
.idea/workspace.xml
CHANGED
@@ -50,6 +50,7 @@
|
|
50 |
}</component>
|
51 |
<component name="RecentsManager">
|
52 |
<key name="CopyFile.RECENT_KEYS">
|
|
|
53 |
<recent name="D:\fastApiProjects\pythonProject1\shipnet" />
|
54 |
</key>
|
55 |
</component>
|
@@ -64,7 +65,7 @@
|
|
64 |
<workItem from="1683665300392" duration="7649000" />
|
65 |
<workItem from="1683708398011" duration="1235000" />
|
66 |
<workItem from="1684437905081" duration="110000" />
|
67 |
-
<workItem from="1686602174110" duration="
|
68 |
</task>
|
69 |
<servers />
|
70 |
</component>
|
@@ -74,6 +75,17 @@
|
|
74 |
<component name="UnknownFeatures">
|
75 |
<option featureType="com.intellij.fileTypeFactory" implementationName="requirements.txt" />
|
76 |
</component>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
78 |
<SUITE FILE_PATH="coverage/pythonProject1$app.coverage" NAME="app Coverage Results" MODIFIED="1683665630669" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
79 |
</component>
|
|
|
50 |
}</component>
|
51 |
<component name="RecentsManager">
|
52 |
<key name="CopyFile.RECENT_KEYS">
|
53 |
+
<recent name="D:\fastApiProjects\pythonProject1" />
|
54 |
<recent name="D:\fastApiProjects\pythonProject1\shipnet" />
|
55 |
</key>
|
56 |
</component>
|
|
|
65 |
<workItem from="1683665300392" duration="7649000" />
|
66 |
<workItem from="1683708398011" duration="1235000" />
|
67 |
<workItem from="1684437905081" duration="110000" />
|
68 |
+
<workItem from="1686602174110" duration="1036000" />
|
69 |
</task>
|
70 |
<servers />
|
71 |
</component>
|
|
|
75 |
<component name="UnknownFeatures">
|
76 |
<option featureType="com.intellij.fileTypeFactory" implementationName="requirements.txt" />
|
77 |
</component>
|
78 |
+
<component name="Vcs.Log.Tabs.Properties">
|
79 |
+
<option name="TAB_STATES">
|
80 |
+
<map>
|
81 |
+
<entry key="MAIN">
|
82 |
+
<value>
|
83 |
+
<State />
|
84 |
+
</value>
|
85 |
+
</entry>
|
86 |
+
</map>
|
87 |
+
</option>
|
88 |
+
</component>
|
89 |
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
90 |
<SUITE FILE_PATH="coverage/pythonProject1$app.coverage" NAME="app Coverage Results" MODIFIED="1683665630669" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
91 |
</component>
|
app.py
CHANGED
@@ -67,53 +67,57 @@ class Net2(nn.Module):
|
|
67 |
class Net(nn.Module):
|
68 |
def __init__(self):
|
69 |
super(Net, self).__init__()
|
70 |
-
self.conv1 = nn.Conv2d(3,
|
|
|
71 |
self.pool1 = nn.MaxPool2d(2, 2)
|
72 |
self.dropout1 = nn.Dropout(0.25)
|
73 |
|
74 |
-
self.conv2 = nn.Conv2d(
|
|
|
75 |
self.pool2 = nn.MaxPool2d(2, 2)
|
76 |
self.dropout2 = nn.Dropout(0.25)
|
77 |
|
78 |
-
self.conv3 = nn.Conv2d(
|
|
|
79 |
self.pool3 = nn.MaxPool2d(2, 2)
|
80 |
self.dropout3 = nn.Dropout(0.25)
|
81 |
|
82 |
-
self.conv4 = nn.Conv2d(
|
|
|
83 |
self.pool4 = nn.MaxPool2d(2, 2)
|
84 |
-
self.dropout4 = nn.Dropout(0.
|
85 |
|
86 |
self.flatten = nn.Flatten()
|
87 |
|
88 |
-
self.fc1 = nn.Linear(
|
89 |
-
self.fc2 = nn.Linear(
|
90 |
self.fc3 = nn.Linear(150, 2)
|
91 |
|
92 |
def forward(self, x):
|
93 |
-
x = F.relu(self.conv1(x))
|
94 |
x = self.pool1(x)
|
95 |
x = self.dropout1(x)
|
96 |
|
97 |
-
x = F.relu(self.conv2(x))
|
98 |
x = self.pool2(x)
|
99 |
x = self.dropout2(x)
|
100 |
|
101 |
-
x = F.relu(self.conv3(x))
|
102 |
x = self.pool3(x)
|
103 |
x = self.dropout3(x)
|
104 |
|
105 |
-
x = F.relu(self.conv4(x))
|
106 |
x = self.pool4(x)
|
107 |
x = self.dropout4(x)
|
108 |
|
109 |
x = self.flatten(x)
|
110 |
x = F.relu(self.fc1(x))
|
111 |
x = F.relu(self.fc2(x))
|
112 |
-
x =
|
113 |
return x
|
114 |
|
115 |
model = None
|
116 |
-
model_path = "
|
117 |
|
118 |
model2 = None
|
119 |
model2_path = "model4.pth"
|
|
|
67 |
class Net(nn.Module):
|
68 |
def __init__(self):
|
69 |
super(Net, self).__init__()
|
70 |
+
self.conv1 = nn.Conv2d(3, 512, 3, padding=1)
|
71 |
+
self.bn1 = nn.BatchNorm2d(512)
|
72 |
self.pool1 = nn.MaxPool2d(2, 2)
|
73 |
self.dropout1 = nn.Dropout(0.25)
|
74 |
|
75 |
+
self.conv2 = nn.Conv2d(512, 256, 3, padding=1)
|
76 |
+
self.bn2 = nn.BatchNorm2d(256)
|
77 |
self.pool2 = nn.MaxPool2d(2, 2)
|
78 |
self.dropout2 = nn.Dropout(0.25)
|
79 |
|
80 |
+
self.conv3 = nn.Conv2d(256, 128, 3, padding=1)
|
81 |
+
self.bn3 = nn.BatchNorm2d(128)
|
82 |
self.pool3 = nn.MaxPool2d(2, 2)
|
83 |
self.dropout3 = nn.Dropout(0.25)
|
84 |
|
85 |
+
self.conv4 = nn.Conv2d(128, 64, 3, padding=1)
|
86 |
+
self.bn4 = nn.BatchNorm2d(64)
|
87 |
self.pool4 = nn.MaxPool2d(2, 2)
|
88 |
+
self.dropout4 = nn.Dropout(0.20)
|
89 |
|
90 |
self.flatten = nn.Flatten()
|
91 |
|
92 |
+
self.fc1 = nn.Linear(1600, 300)
|
93 |
+
self.fc2 = nn.Linear(300, 150)
|
94 |
self.fc3 = nn.Linear(150, 2)
|
95 |
|
96 |
def forward(self, x):
|
97 |
+
x = F.relu(self.bn1(self.conv1(x)))
|
98 |
x = self.pool1(x)
|
99 |
x = self.dropout1(x)
|
100 |
|
101 |
+
x = F.relu(self.bn2(self.conv2(x)))
|
102 |
x = self.pool2(x)
|
103 |
x = self.dropout2(x)
|
104 |
|
105 |
+
x = F.relu(self.bn3(self.conv3(x)))
|
106 |
x = self.pool3(x)
|
107 |
x = self.dropout3(x)
|
108 |
|
109 |
+
x = F.relu(self.bn4(self.conv4(x)))
|
110 |
x = self.pool4(x)
|
111 |
x = self.dropout4(x)
|
112 |
|
113 |
x = self.flatten(x)
|
114 |
x = F.relu(self.fc1(x))
|
115 |
x = F.relu(self.fc2(x))
|
116 |
+
x = F.softmax(self.fc3(x), dim=1)
|
117 |
return x
|
118 |
|
119 |
model = None
|
120 |
+
model_path = "models1.pth"
|
121 |
|
122 |
model2 = None
|
123 |
model2_path = "model4.pth"
|
modelc1.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:39a9ce0e7d8492700055756e0e97a5a5f1464d754f203aa864984426c5797a45
|
3 |
+
size 8383103
|
models1.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5efe7a536fbd55de60403678c39f794fe61c10fbd594cfc70de095a505e7761b
|
3 |
+
size 8380671
|