Giter Club home page Giter Club logo

Comments (6)

lhjner avatar lhjner commented on July 3, 2024

@787205128 I also encountered this problem, have you solved it?

from self-regulation-employing-a-generative-adversarial-network-to-improve-event-detection.

ZhenHuaZhou68 avatar ZhenHuaZhou68 commented on July 3, 2024

@787205128 I also encountered this problem, have you solved it?

The author gave a reason in README-NOTE:One may provide a file which contains the word embeddings pretrained by her/himself. In such a case, the file name should be the same with that we mentioned above.If not, you'd better comment out the 57th line in train.py,and meanwhile modify the 58th line as config['feature_init_weight'] = None.

from self-regulation-employing-a-generative-adversarial-network-to-improve-event-detection.

ZhenHuaZhou68 avatar ZhenHuaZhou68 commented on July 3, 2024

@787205128 I also encountered this problem, have you solved it?
And , how did you process ACE-2005, An event trigger may correspond to multiple words in a metion,this caused the length of tks != tgs,this will cause errors later, Do you have any solution?

from self-regulation-employing-a-generative-adversarial-network-to-improve-event-detection.

lhjner avatar lhjner commented on July 3, 2024

@787205128 I also encountered this problem, have you solved it?
And , how did you process ACE-2005, An event trigger may correspond to multiple words in a metion,this caused the length of tks != tgs,this will cause errors later, Do you have any solution?
我是这样处理的,但是不知道结果怎么样。使用预训练词向量一直报错,所以按您前面所说的改后是没有问题的。
I mean , it ' s conceivable that the other six have all gotten together in Marinello ' s absence and drafted her , but it also seems pretty clear that she has agreed to do it , and , if all the rumors are true and she steps down , it will be so that she can take on these new responsibilities .
O O O O O O O O O O O O O O O O O O O O O start-position O O O O O O O O O O O O O O O O O O O O O O O O O O end-position end-position O O O O O O O O O O O O O O

from self-regulation-employing-a-generative-adversarial-network-to-improve-event-detection.

lhjner avatar lhjner commented on July 3, 2024

@787205128 Excuse me, did you run this code, I encountered many problems in the subsequent process, and now the test result is always 0.
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:458: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:459: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:460: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:461: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:462: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:465: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])

Parameters:
BATCH_SIZE = 10
CLASSES = 34
DROPOUT_RATE = 0
FEATURE_WEIGHT_DROPOUT = 0.2
FEATURE_WEIGHT_SHAPE = [19490, 300]
HIDDEN_SIZE = 150
L2_RATE = 0.0
LEARNING_RATE = 0.3
LR_DECAY = 0.95
MODEL_PATH = model/best.pkl
NUM_EPOCHS = 10
NUM_LAYERS = 1
RNN_UNIT = lstm
SEQUENCE_LENGTH = 80
TRAIN_MAX_PATIENCE = 100

/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/tensorflow/python/ops/gradients_impl.py:93: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
2019-12-23 21:17:08.743333: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2019-12-23 21:17:08.743381: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2019-12-23 21:17:08.743391: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2019-12-23 21:17:08.743403: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2019-12-23 21:17:08.743416: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/sklearn/metrics/classification.py:1437: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 due to no predicted samples.
'precision', 'predicted', average, warn_for)
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/sklearn/metrics/classification.py:1439: UndefinedMetricWarning: Recall and F-score are ill-defined and being set to 0.0 due to no true samples.
'recall', 'true', average, warn_for)
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/sklearn/metrics/classification.py:1437: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 due to no predicted samples.
'precision', 'predicted', average, warn_for)
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/sklearn/metrics/classification.py:1439: UndefinedMetricWarning: Recall is ill-defined and being set to 0.0 due to no true samples.
'recall', 'true', average, warn_for)
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/sklearn/metrics/classification.py:1437: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 due to no predicted samples.
'precision', 'predicted', average, warn_for)
/home/lhj/anaconda3/envs/segan/lib/python3.6/site-packages/sklearn/metrics/classification.py:1439: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 due to no true samples.
'recall', 'true', average, warn_for)
multi-classification precision 0, recall 0, f1 0
binary-classification precision 0, recall 0, f1 0

from self-regulation-employing-a-generative-adversarial-network-to-improve-event-detection.

amirveyseh avatar amirveyseh commented on July 3, 2024

I have the same environment (Tensorflow 1.2 and python 3.6) but when I run 'python train.py' I have this error:

Parameters:
BATCH_SIZE = 10
CLASSES = 34
DROPOUT_RATE = 0
FEATURE_WEIGHT_DROPOUT = 0.2
FEATURE_WEIGHT_SHAPE = [19490, 300]
HIDDEN_SIZE = 150
L2_RATE = 0.0
LEARNING_RATE = 0.3
LR_DECAY = 0.95
MODEL_PATH = model/best.pkl
NUM_EPOCHS = 200
NUM_LAYERS = 1
RNN_UNIT = lstm
SEQUENCE_LENGTH = 80
TRAIN_MAX_PATIENCE = 100

Traceback (most recent call last):
File "train.py", line 70, in
main()
File "train.py", line 55, in main
model = Model(config)
File "/disk/apouranb/cybersequrity/cybersecurityEvent/mycode/self/self/model.py", line 42, in init
self.build()
File "/disk/apouranb/cybersequrity/cybersecurityEvent/mycode/self/self/model.py", line 204, in build
self.train_op_g = optimizer_g.minimize(self.g_loss + 0.1 * self.diff_loss, var_list=vars_g)
File "/home/users/apouranb/miniconda2/envs/myenv3/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 315, in minimize
grad_loss=grad_loss)
File "/home/users/apouranb/miniconda2/envs/myenv3/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 380, in compute_gradients
raise ValueError("No variables to optimize.")
ValueError: No variables to optimize.

from self-regulation-employing-a-generative-adversarial-network-to-improve-event-detection.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.