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

issue running test example #3

Open
gbernal opened this issue Aug 13, 2020 · 8 comments
Open

issue running test example #3

gbernal opened this issue Aug 13, 2020 · 8 comments

Comments

@gbernal
Copy link

gbernal commented Aug 13, 2020

HI @liuq99 Thank you for sharing your project.

I'm trying to run the test code following the instructions in the readme file

python -m edgegan.test --name=edgegan --dataroot=/home/PycharmProjects/EdgeGAN/data --dataset=bike --nomulticlasses --gpu=0

but I'm getting the following errors.

tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [100,8192] rhs shape= [114,8192]
         [[{{node save/Assign_56}}]]

During handling of the above exception, another exception occurred:
    err, "a mismatch between the current graph and the graph")
tensorflow.python.framework.errors_impl.InvalidArgumentError: Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Assign requires shapes of both tensors to match. lhs shape= [100,8192] rhs shape= [114,8192]
         [[node save/Assign_56 (defined at /.local/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]]

I'm guessing that it might be related to the data structure. Currently, this is how it is

EdegGAN
└───data 
   └──--bike
    └───train
       |   |    <file00>.png #data from the SketchyCOCO > Objects > Sketch > Train > 2 
       |   |    <file01>.png
       |   |    ...
       |   
    └───test
        |    <file00>.png # #data from the SketchyCOCO > Objects > Sketch > Val > 2 
        |    <file01>.png
        |    ...

Thank you and I look forward to your response.

@Hongiee2
Copy link

Hongiee2 commented Nov 4, 2020

I got the same problem, too.

I think the pre-trained model which link to google drive is multi classes model

So, the following command would not give you error
python -m edgegan.test --name=edgegan --dataroot= --dataset= --gpu=

when I run it with multi classes command, there are not error but the result doesn't appear in test_output folder

I hope @liuq99 give us some help !

@fjenett
Copy link

fjenett commented Jan 14, 2021

Ran into the empty output folder problem too … I found that to run the multiclass model provided you have to provide it with the same directory structure as for training:

EdegGAN
└───data
    └───train
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>
    |   
    └───test
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>

Make sure that there is one directory for each class [0 ... 13] (for a 14 classes model). The directories can be empty if you are only testing one file … make sure to put it into the correct class directory.

@lyhh123
Copy link

lyhh123 commented Mar 30, 2021

Could anyone run the test code following the instructions in the readme file successfully?

@PaVaNTrIpAtHi
Copy link

I got the same problem, too.

I think the pre-trained model which link to google drive is multi classes model

So, the following command would not give you error python -m edgegan.test --name=edgegan --dataroot= --dataset= --gpu=

when I run it with multi classes command, there are not error but the result doesn't appear in test_output folder

I hope @liuq99 give us some help !

Same with me

@PaVaNTrIpAtHi
Copy link

Ran into the empty output folder problem too … I found that to run the multiclass model provided you have to provide it with the same directory structure as for training:

EdegGAN
└───data
    └───train
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>
    |   
    └───test
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>

Make sure that there is one directory for each class [0 ... 13] (for a 14 classes model). The directories can be empty if you are only testing one file … make sure to put it into the correct class directory.

Did you get the output by this method?

@CTangist
Copy link

Could anyone run the test code following the instructions in the readme file successfully?

Hello, may I ask you to reproduce successfully now, how to deploy the data set?

@anzal1
Copy link

anzal1 commented Nov 4, 2023

Ran into the empty output folder problem too … I found that to run the multiclass model provided you have to provide it with the same directory structure as for training:

EdegGAN
└───data
    └───train
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>
    |   
    └───test
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>

Make sure that there is one directory for each class [0 ... 13] (for a 14 classes model). The directories can be empty if you are only testing one file … make sure to put it into the correct class directory.

Did you get the output by this method?

yup you have to make a folder before the test directory , names as class for ex it executes without any issue and produces output if the test folder is inside a folder named class14

@aheroro
Copy link

aheroro commented Aug 2, 2024

In which folder should GT be placed?

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

8 participants