Skip to content

Commit

Permalink
check for file existence
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Zotti authored and Ryan Zotti committed Oct 10, 2016
1 parent 342bdce commit 6cbf7e4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions util.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import tensorflow as tf
from random import randint
import boto3
from pathlib import Path

def dead_ReLU_pct(matrix):
zeros = (matrix.size - matrix[matrix > 0].size)
Expand Down Expand Up @@ -166,6 +167,14 @@ def file_is_in_s3(bucket_name,full_path_to_file):
break
return answer


def file_is_stored_locally(full_path_to_file):
file_exists = False
my_file = Path(full_path_to_file)
if my_file.is_file():
file_exists = True
return file_exists

if __name__ == '__main__':
tensorboard_basedir = '/Users/ryanzotti/Documents/repos/Self_Driving_RC_Car/tf_visual_data/runs/'
abc = record_count('/Users/ryanzotti/Documents/repos/Self_Driving_RC_Car/shape')
Expand Down

0 comments on commit 6cbf7e4

Please sign in to comment.