Comments (5)
Hi Robin,
So the reason I dont use it anywhere particularly is that I generally train models on a detachable (screen) terminal with my script running in ipython. I generally just call my predict() function with no particular arguments once the training process gets over.
The predict function should work by default if you have all the data prepared as I have instructed. Let me know if you have any issues.
PS: Follow all my preprocessing instructions, (each and every line). Predict function requires files like test_buckets.npy and val_buckets.npy (which are basically images bucketed based on their size).
Predict function just randomly samples a mini-batch from those buckets and makes a free-run prediction using just the images.
from im2latex-tensorflow.
Hi Robin,
This architecture would certainly work well, for all problems related to OCR (In a way, im2latex itself is a type of OCR task). Handwriting is a harder version of OCR owing to the sheer variance in writing styles. But I must say it should work decently well atleast.
PS: Considering this architecture, it would be best to preprocess the handwriting data in a similar way, in the sense that you'd have to restrict it to a few bucket sizes not exceed by far in length. The bucket sizes (of images) used in this paper are: (120,50), (160,40), (200,40),(200,50), (240,40), (240,50), (280,40), (280,50), (320,40),(320,50), (360,40), (360,50), (360,60), (360, 100), (400,50),(400,160), (500,100).
Hope this helps! Good luck!
Best,
Rithesh
from im2latex-tensorflow.
Hi Rithesh,
Thanks for being patient with. I have run a few test and the perplexity is pretty low. However, when I ipython to call the predict function as you mentioned, the predict error pops up:
FailedPreconditionError (see above for traceback): Attempting to use uninitialized value conv3_1//beta
[[Node: conv3_1//beta/read = IdentityT=DT_FLOAT, _class=["loc:@conv3_1//beta"], _device="/job:localhost/replica:0/task:0/gpu:0"]]
[[Node: scan_1/while/Identity/_964 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_249_scan_1/while/Identity", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"]]
Do you have any idea about this error?
from im2latex-tensorflow.
Hey Robin,
I fixed this issue (seemed to be pretty new when I ran on my laptop as well). Check the latest commit.
Also, I added a link to my best weight files (from the latest checkpoint). Good luck!
Best,
Rithesh
from im2latex-tensorflow.
Hey Rithesh,
Thank you for fixing the issue :)
from im2latex-tensorflow.
Related Issues (20)
- def im2latex_cnn(X, num_feats, bn, train_mode='True'): HOT 1
- Cannot run the program HOT 3
- output the whole sequence within TF HOT 9
- CPU data format not supported HOT 1
- the weights files not works HOT 1
- I got poor results on my own screenshots. HOT 3
- out,state = tflib.ops.FreeRunIm2LatexAttention('AttLSTM',emb_seqs,ctx,EMB_DIM,ENC_DIM,DEC_DIM,D,H,W) HOT 2
- wrong parameters
- run python attention.py ,error is following. how to fix it ? thanks in advance! HOT 12
- InvalidArgumentError (see above for traceback): assertion failed: [Expected shape for Tensor rnn/sequence_length:0 is ] [20] [ but saw shape: ] [8] HOT 1
- how to Visualize the attention mechanism
- ValueError: Depth of input (32) is not a multiple of input depth of filter (64) for 'conv2/Conv2D' (op: 'Conv2D') with input shapes: [?,?,?,32], [3,3,64,128]. HOT 1
- Please write a requirements.txt file because with tf 2.0, it might not be possible HOT 3
- AttributeError: module 'tensorflow_core._api.v2.nn' has no attribute 'rnn_cell' HOT 1
- Where is "weights_best_numpy.npy" used in predict.py HOT 2
- Do the operating system of Windows can run the program
- how is the exact matching using this repo in im2latex 100k
- predict output every bad result HOT 2
- Got so many errors, but why raw input? and also can't decode 0xe7 in utf-8 codec
- How to get tflite file from this code?
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 im2latex-tensorflow.