Browse Source

delete unnecessary files

tags/v0.1.0
FengZiYjun 6 years ago
parent
commit
174ce35fc8
10 changed files with 9 additions and 83 deletions
  1. +0
    -15
      .idea/deployment.xml
  2. +0
    -14
      .idea/fastNLP.iml
  3. +0
    -16
      .idea/inspectionProfiles/Project_Default.xml
  4. +0
    -7
      .idea/misc.xml
  5. +0
    -8
      .idea/modules.xml
  6. +0
    -7
      .idea/other.xml
  7. +0
    -6
      .idea/vcs.xml
  8. +2
    -4
      fastNLP/action/tester.py
  9. +6
    -5
      fastNLP/modules/other_modules.py
  10. +1
    -1
      test/test_POS_pipeline.py

+ 0
- 15
.idea/deployment.xml View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" autoUpload="Always" serverName="zyfeng@10.40.40.86:22">
<serverData>
<paths name="zyfeng@10.40.40.86:22">
<serverdata>
<mappings>
<mapping deploy="/home/zyfeng/Desktop/fastNLP" local="$PROJECT_DIR$" />
</mappings>
</serverdata>
</paths>
</serverData>
<option name="myAutoUpload" value="ALWAYS" />
</component>
</project>

+ 0
- 14
.idea/fastNLP.iml View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Remote Python 3.6.6 (sftp://zyfeng@10.40.40.86:22/home/zyfeng/miniconda3/envs/fastnlp/bin/python3.6)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="renderExternalDocumentation" value="true" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>

+ 0
- 16
.idea/inspectionProfiles/Project_Default.xml View File

@@ -1,16 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="3">
<item index="0" class="java.lang.String" itemvalue="torch" />
<item index="1" class="java.lang.String" itemvalue="numpy" />
<item index="2" class="java.lang.String" itemvalue="torchvision" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>

+ 0
- 7
.idea/misc.xml View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Remote Python 3.6.6 (sftp://zyfeng@10.40.40.86:22/home/zyfeng/miniconda3/envs/fastnlp/bin/python3.6)" project-jdk-type="Python SDK" />
</project>

+ 0
- 8
.idea/modules.xml View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/fastNLP.iml" filepath="$PROJECT_DIR$/.idea/fastNLP.iml" />
</modules>
</component>
</project>

+ 0
- 7
.idea/other.xml View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PySciProjectComponent">
<option name="PY_SCI_VIEW" value="true" />
<option name="PY_SCI_VIEW_SUGGESTED" value="true" />
</component>
</project>

+ 0
- 6
.idea/vcs.xml View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

+ 2
- 4
fastNLP/action/tester.py View File

@@ -158,8 +158,8 @@ class POSTester(BaseTester):
def evaluate(self, predict, truth):
truth = torch.Tensor(truth)
loss, prediction = self.model.loss(predict, truth, self.mask, self.batch_size, self.max_len)
results = torch.Tensor(prediction[0][0]).view((-1, ))
accuracy = float(torch.sum(results == truth.view((-1, )))) / results.shape[0]
results = torch.Tensor(prediction[0][0]).view((-1,))
accuracy = float(torch.sum(results == truth.view((-1,)))) / results.shape[0]
return [loss.data, accuracy]

def matrices(self):
@@ -174,5 +174,3 @@ class POSTester(BaseTester):
"""
loss, accuracy = self.matrices()
return "dev loss={:.2f}, accuracy={:.2f}".format(loss, accuracy)



+ 6
- 5
fastNLP/modules/other_modules.py View File

@@ -2,16 +2,17 @@
This is borrowed from FudanParser. Not stable. Do not use !!!

"""
import numpy
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Parameter
from .utils import orthogonal
import torch
import torch.utils.data
import numpy
from torch.autograd import Function, Variable
from torch import optim
from torch.autograd import Function, Variable
from torch.nn import Parameter

from .utils import orthogonal


class GroupNorm(nn.Module):


+ 1
- 1
test/test_POS_pipeline.py View File

@@ -53,7 +53,7 @@ if __name__ == "__main__":
test_args = ConfigSection()
ConfigLoader("config.cfg", "").load_config("./data_for_tests/config", {"POS_test": test_args})

#test_args = {"save_output": True, "validate_in_training": False, "save_dev_input": False,
# test_args = {"save_output": True, "validate_in_training": False, "save_dev_input": False,
# "save_loss": True, "batch_size": 1, "pickle_path": pickle_path}
tester = POSTester(test_args)
tester.test(model)


Loading…
Cancel
Save