singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [singa] joddiy commented on pull request #712: Implemented superresolution model
Date Thu, 28 May 2020 19:42:32 GMT

joddiy commented on pull request #712:

   > 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:

View raw message