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

code logic error #24

Open
gneworld opened this issue May 28, 2020 · 2 comments
Open

code logic error #24

gneworld opened this issue May 28, 2020 · 2 comments

Comments

@gneworld
Copy link

Hi,

  There is "Inconsistent indentation: mix of tabs and spaces"  error reported  in agent.py file(line245--247) , so what is the right code logic for these three lines of code?

    if epoch>0 and epoch%20==0 and self.current_epoch != epoch:
        self.current_epoch = epoch
        if epoch>0 and (epoch == 1000):
            self.p.constant_lane_loss += 0.5

245: self.p.constant_nonexist += 0.5
246: self.p.l_rate /= 2.0
247: self.setup_optimizer()

@china56321
Copy link

china56321 commented Jun 3, 2020

Hi,

  There is "Inconsistent indentation: mix of tabs and spaces"  error reported  in agent.py file(line245--247) , so what is the right code logic for these three lines of code?

    if epoch>0 and epoch%20==0 and self.current_epoch != epoch:
        self.current_epoch = epoch
        if epoch>0 and (epoch == 1000):
            self.p.constant_lane_loss += 0.5

245: self.p.constant_nonexist += 0.5 246: self.p.l_rate /= 2.0 247: self.setup_optimizer()

I also found this problem . after that , i meet other problem ,Like below:
Traceback (most recent call last):
File "test.py", line 10, in
import agent
File "/home/share/make/PINet/agent.py", line 9, in
from util_hourglass import *
File "/home/share/make/PINet/util_hourglass.py", line 8, in
from parameters import Parameters
File "/home/share/make/PINet/parameters.py", line 8, in
class Parameters():
File "/home/share/make/PINet/parameters.py", line 56, in Parameters
grid_location = np.zeros((grid_y, grid_x, 2))
TypeError: 'float' object cannot be interpreted as an integer
Have you encountered this problem ?

@gneworld
Copy link
Author

gneworld commented Jun 3, 2020

@china56321 please use python2

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