Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A ValueError when attempting to run Basenji #84

Closed
jeffmylife opened this issue May 31, 2018 · 3 comments
Closed

A ValueError when attempting to run Basenji #84

jeffmylife opened this issue May 31, 2018 · 3 comments

Comments

@jeffmylife
Copy link
Contributor

When I attempt to run the Basenji model as in the example, this shows up:

`

pred = model.pipeline.predict_example()
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "", line 1, in
File "/anaconda3/lib/python3.6/site-packages/kipoi/pipeline.py", line 84, in predict_example
pred_list.append(self.model.predict_on_batch(batch['inputs']))
File "/anaconda3/lib/python3.6/site-packages/kipoi/model.py", line 1310, in predict_on_batch
feed_dict=merge_dicts(feed_dict, self.const_feed_dict))
File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 900, in run
run_metadata_ptr)
File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1111, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (10, 131072, 4) for Tensor 'inputs:0', which has shape '(2, 131072, 4)'
`
screen shot 2018-05-31 at 3 24 09 pm

This occurred again when attempting to run the

(kipoi-Basenji) nsheng-mbp:Basenji jeffrey$ kipoi predict Basenji
--dataloader_args='{'intervals_file': 'example_files/intervals.bed', 'fasta_file': 'example_files/hg38_chr22.fa'}'
-o '/tmp/Basenji.example_pred.tsv'

screen shot 2018-05-31 at 3 25 26 pm

Not sure how to fix this one. Any help is appreciated.

@Avsecz
Copy link
Contributor

Avsecz commented May 31, 2018

Hi, add a flag: --batch_size=2. The current implementation of basenji hardcodes the batch size.

@Avsecz
Copy link
Contributor

Avsecz commented May 31, 2018

I'll fix the code snippet on the website soon: kipoi/website#69

@jeffmylife
Copy link
Contributor Author

I believe this worked for me.
Thank you for being so quick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants