Skip to content

NameError: global name 'train_filename' is not defined ? @IsaacGuan sir please help me in finding the error ? #12

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

Open
piyushsingh2k7 opened this issue Nov 18, 2021 · 0 comments

Comments

@piyushsingh2k7
Copy link

In provider.py I have made these changes on the following function

Read numpy array data and label from h5_filename

def load_h5_data_label_seg(train_filename):
f = h5py.File(train_filename)
data = f['data'][:]
#label = f['points_label'][:]
seg = f['pid'][:]
return (data, seg) #label can be added later

and got this output error after running it

Training for the epoch 1/100 ...
Loading train file /home/vrmslab/Downloads/PointNet-Plane-Detection-master/./data/hdf5_data/data_training.h5
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273024 thread 1 bound to OS proc set 1
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273073 thread 2 bound to OS proc set 2
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273074 thread 3 bound to OS proc set 3
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273075 thread 4 bound to OS proc set 4
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273076 thread 5 bound to OS proc set 5
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273077 thread 6 bound to OS proc set 6
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273078 thread 7 bound to OS proc set 7
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273079 thread 8 bound to OS proc set 8
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273080 thread 9 bound to OS proc set 9
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273081 thread 10 bound to OS proc set 10
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273083 thread 12 bound to OS proc set 12
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273082 thread 11 bound to OS proc set 11
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273084 thread 13 bound to OS proc set 13
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273085 thread 14 bound to OS proc set 14
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273086 thread 15 bound to OS proc set 15
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273087 thread 16 bound to OS proc set 0
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273025 thread 17 bound to OS proc set 1
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273088 thread 18 bound to OS proc set 2
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273089 thread 19 bound to OS proc set 3
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273090 thread 20 bound to OS proc set 4
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273091 thread 21 bound to OS proc set 5
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273092 thread 22 bound to OS proc set 6
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273093 thread 23 bound to OS proc set 7
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273094 thread 24 bound to OS proc set 8
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273095 thread 25 bound to OS proc set 9
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273096 thread 26 bound to OS proc set 10
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273097 thread 27 bound to OS proc set 11
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273098 thread 28 bound to OS proc set 12
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273099 thread 29 bound to OS proc set 13
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273100 thread 30 bound to OS proc set 14
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273101 thread 31 bound to OS proc set 15
OMP: Info #254: KMP_AFFINITY: pid 272970 tid 273102 thread 32 bound to OS proc set 0
Training Total Mean_loss: 0.344301
Training Seg Mean_loss: 0.344301
Training Seg Accuracy: 0.455200

<<< Testing on the test dataset ...
Loading test file /home/vrmslab/Downloads/PointNet-Plane-Detection-master/./data/hdf5_data/data_testing.h5
Traceback (most recent call last):
File "/home/vrmslab/Downloads/PointNet-Plane-Detection-master/train.py", line 333, in
train()
File "/home/vrmslab/Downloads/PointNet-Plane-Detection-master/train.py", line 315, in train
eval_one_epoch(epoch)
File "/home/vrmslab/Downloads/PointNet-Plane-Detection-master/train.py", line 253, in eval_one_epoch
cur_data, cur_seg = provider.load_h5_data_label_seg(train_filename)
NameError: global name 'train_filename' is not defined

@piyushsingh2k7 piyushsingh2k7 changed the title NameError: global name 'train_filename' is not defined ? @IssacGuan sir please help me in finding the error ? NameError: global name 'train_filename' is not defined ? @IsaacGuan sir please help me in finding the error ? Nov 18, 2021
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

1 participant