You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by GitBox <gi...@apache.org> on 2020/05/28 19:42:32 UTC

[GitHub] [singa] joddiy commented on pull request #712: Implemented superresolution model

joddiy commented on pull request #712:
URL: https://github.com/apache/singa/pull/712#issuecomment-635556312


   > Implemented the super-resolution model. It generated the picture and I think it is correct. However, it does not pass this
   > 
   > ```
   > # verify the test
   >     from utils import load_dataset
   >     inputs, ref_outputs = load_dataset(os.path.join('/tmp', 'super_resolution', 'test_data_set_0'))
   >     x_batch = tensor.Tensor(device=dev, data=inputs[0])
   >     outputs = model.forward(x_batch)
   >     for ref_o, o in zip(ref_outputs, outputs):
   >         np.testing.assert_almost_equal(ref_o, tensor.to_numpy(o), 4)
   > ```
   > 
   > It fails on the second line, giving
   > `ValueError: cannot reshape array of size 451584 into shape (224,224)`
   > 
   > I assume that this test does not hold for this test data set as it has a different shape. Please correct me if I am wrong.
   
   Hi, @agnesnatasya , which line reports this error? I guess the √451584 is 672, it must be the output shape of the model, but the 224 is the input shape.
   
   By the way, why don't you use the Image library, but use the resizeimage? I guess the Image maybe better. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org