Comments (4)
from dilated-cnn-ner.
I'm trying it right now. It looks like tf.flags is no longer part of the tensorflow package so I started out by switching that. From what I can see, a couple of the tensorflow classes are deprecated, so I could continue using them or switch it out.
I was wondering if you knew why I am getting this weird behavior with preprocessing inside a session vs outside. I don't have too much experience with what tensorflow does behind the scenes, so if you have any additional insight, that would be great!
from dilated-cnn-ner.
from dilated-cnn-ner.
I don't think so. I'm running the preprocessing as soon as I create the session.
The difference is between doing this (which takes almost twice as long)
with sv.managed_session(FLAGS.master, config=config) as sess:
print("starting session")
start = time.time()
f = open(FLAGS.sample_text_file_name).read().strip().split("\n")
print("{} {} {} {} {} {}".format(len(vocab_str_id_map), len(shape_str_id_map), len(char_str_id_map), len(vocab_id_str_map), len(shape_id_str_map), len(char_id_str_map)))
sample_batches = batch_sentence_preprocess(f, vocab_str_id_map, shape_str_id_map, char_str_id_map, vocab_id_str_map, shape_id_str_map, char_id_str_map, batch_size=128)
#print(np.asarray(sample_batches).shape)
print("%.2f" % (time.time()-start))
# do the actual inference here
versus doing this (which takes half as long)
start = time.time()
f = open(FLAGS.sample_text_file_name).read().strip().split("\n")
print("{} {} {} {} {} {}".format(len(vocab_str_id_map), len(shape_str_id_map), len(char_str_id_map), len(vocab_id_str_map), len(shape_id_str_map), len(char_id_str_map)))
sample_batches = batch_sentence_preprocess(f, vocab_str_id_map, shape_str_id_map, char_str_id_map, vocab_id_str_map, shape_id_str_map, char_id_str_map, batch_size=128)
print("%.2f" % (time.time()-start))
with sv.managed_session(FLAGS.master, config=config) as sess:
print("starting session")
...
# do the actual inference here
from dilated-cnn-ner.
Related Issues (20)
- Inference HOT 5
- What is the use of projection layer HOT 1
- Questions regarding differences between the implementation and the experiment details in the research paper HOT 5
- Need some clarification on the settings HOT 2
- Training File HOT 1
- Training issue HOT 1
- Is the dilated cnn ner model stable? HOT 2
- Did you try your model on other seq labeling tasks like Chunking or POS? HOT 1
- Nan problem during training on ontonotes data set HOT 7
- Getting some issue with permission beyond my understanding HOT 3
- int() argument must be a string, a bytes-like object or a number, not 'map' HOT 2
- About the paper HOT 6
- details on the accuracy HOT 12
- preprocessing before triggering 'preprocess.sh' for ontonotes HOT 2
- Validate model on real text data HOT 4
- InvalidArgumentError: indices[11,21] = 243838 is not in [0, 243245)
- Inconsistent results when predicting a single sentence versus predicting labels for dev set HOT 4
- Any pytorch version of dilated-cnn-ner around ? HOT 3
- Question for the paper (only)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dilated-cnn-ner.