Comments (5)
First guess is that your tensorboardX versio is out of date.
Now tensorboardX expects a CHW output to make it an image, regardless of the fact that's torch or numpy, which was not the case before.
so i suggest you try to update tensorboardX with pip
from sfmlearner-pytorch.
zfang@biwirender17:/scratch_net/biwidl204/zfang/SfmLearner-Pytorch-master$ CUDA_VISIBLE_DEVICES=$SGE_GPU python3 train.py /scratch_net/biwidl204_second/zfang/kitti_sfm/ -b4 -m0 -s2.0 --epoch-size 1000 --sequence-length 5 --log-output --with-gt
=> will save everything to checkpoints/kitti_sfm,epoch_size1000,seq5,s2.0/11-19-14:33
=> fetching scenes in '/scratch_net/biwidl204_second/zfang/kitti_sfm/'
38564 samples found in 54 train scenes
5164 samples found in 8 valid scenes
=> creating model
=> no mask loss, PoseExpnet will only output pose
=> setting adam solver
N/A% (0 of 200) | | Elapsed Time: 0:00:00 ETA: --:--:--
* Avg Loss : 2.038
100% (1000 of 1000) |####################| Elapsed Time: 0:02:38 ETA: 00:00:00
N/A% (0 of 1291) | | Elapsed Time: 0:00:00 ETA: --:--:--
Traceback (most recent call last):
File "/scratch_net/biwidl204/zfang/anaconda3/lib/python3.7/site-packages/PIL/Image.py", line 2460, in fromarray
mode, rawmode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 128), '|u1')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 515, in <module>
main()
File "train.py", line 219, in main
errors, error_names = validate_with_gt(args, val_loader, disp_net, epoch, logger, output_writers)
File "/scratch_net/biwidl204/zfang/anaconda3/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 46, in decorate_no_grad
return func(*args, **kwargs)
File "train.py", line 488, in validate_with_gt
epoch)
File "/scratch_net/biwidl204/zfang/anaconda3/lib/python3.7/site-packages/tensorboardX/writer.py", line 412, in add_image
self.file_writer.add_summary(image(tag, img_tensor), global_step, walltime)
File "/scratch_net/biwidl204/zfang/anaconda3/lib/python3.7/site-packages/tensorboardX/summary.py", line 205, in image
image = make_image(tensor, rescale=rescale)
File "/scratch_net/biwidl204/zfang/anaconda3/lib/python3.7/site-packages/tensorboardX/summary.py", line 243, in make_image
image = Image.fromarray(tensor)
File "/scratch_net/biwidl204/zfang/anaconda3/lib/python3.7/site-packages/PIL/Image.py", line 2463, in fromarray
raise TypeError("Cannot handle this data type")
TypeError: Cannot handle this data type
It still arise problem.
from sfmlearner-pytorch.
Last pypi package is 1.4, and it should work with it. Unfortunately, there is a breakage between version 1.4 and anterior versions, and it cannot work for both versions unless we put a switch between tqdm versions, which i don't find ideal for readability reasons.
https://pypi.org/project/tensorboardX/1.4/
you can easily install with the -U
version
pip install -U tensorboardX
If you do not wish to update tensorbaordX to 1.4, you can pass a HWC
tensor to the add_image
function instead of CHW
(the way it was used before)
from sfmlearner-pytorch.
After some research, turns out the function tensor2array
is actually broken, a patch is coming. However, the patch still won't make it work with version 1.1.
Once the function is patched, I advise you to also update this repo inaddition to tensorboardX to version 1.4
from sfmlearner-pytorch.
I just pushed changes to the function tensor2array
you can now choose if you want channel to be first or last. With an outdated version of tensorboardX, just set function calls of tensor2array with argument channel_first
to False
from sfmlearner-pytorch.
Related Issues (20)
- what's the minimal files required to train depth only model HOT 1
- Query regarding depth map. HOT 2
- Large Errors on Pose Prediction Network HOT 3
- why the gpu memory cost of tensorflow version is larger than pytorch version HOT 2
- Weird results from pretrained model on KITTI images HOT 4
- Question about using oxts data HOT 1
- Cannot run `train.py` with nohup HOT 2
- imread during inference load the image as uint8 HOT 4
- How About the Flops, fps and parameter of this model? HOT 1
- regarding the predicted depth map during inverse warp HOT 2
- How to visualize the warped image (ref_img_wapred) HOT 2
- regarding inverse_warping HOT 10
- Is the image input of depth network fixed? HOT 2
- Question about diff
- How to load training dataset
- Regarding the depth used for generating target image HOT 5
- Question about the poses predicted by the posenet HOT 2
- about the pose scale HOT 2
- difference of the predicted translation and ground truth vectors HOT 7
- samples in test_files_eigen dont exist in the KITTI
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 sfmlearner-pytorch.