From f7918e1dcd5b0c1f8114f488fc35a63a81e94535 Mon Sep 17 00:00:00 2001 From: Vijay Vasudevan Date: Wed, 18 Nov 2015 16:41:37 -0800 Subject: [PATCH] TensorFlow: Removal of large assets and small other fixes. Changes: - Remove all large assets from the repoistory, incuding the other 50MiB model protobuf and a lot of images in our g3doc directory. We will maintain these assets externally for now. g3doc images may be broken for a little bit, but the website will be fine, which is the important resource. By @vrv and @petewarden. Updates READMES to reflect the external model resources. - Fix to saver's latest_checkpoint function by Zhifeng - Made protos visibility public by @vrv - Updates to docs by @mrry, Andy - Embed tensorboard resource for summary icon by Daniel - More updates to backwars compat by @josh11b Base CL: 108194981 --- tensorflow/core/BUILD | 2 +- tensorflow/core/framework/op_def_util.cc | 39 + tensorflow/core/framework/op_def_util.h | 7 + tensorflow/core/graph/graph_partition.cc | 4 + tensorflow/examples/android/README.md | 20 +- .../imagenet_comp_graph_label_strings.txt | 1001 ----------------- tensorflow/examples/label_image/README.md | 23 +- .../label_image/data/googlenet_labels.txt | 1001 ----------------- tensorflow/examples/label_image/main.cc | 14 +- tensorflow/g3doc/how_tos/graph_viz/index.md | 2 +- .../summaries_and_tensorboard/index.md | 2 +- .../g3doc/tutorials/mnist/input_data.py | 2 +- tensorflow/python/training/input.py | 36 + tensorflow/python/training/saver.py | 6 +- tensorflow/python/training/saver_test.py | 4 + .../tf-graph-common/lib/scene/annotation.ts | 11 +- .../tf-graph/tf-graph-controls.html | 18 +- .../components/tf-graph/tf-graph-icon.html | 5 +- .../tensorboard/lib/svg/summary-icon.svg | 3 - .../eigen3/Eigen/src/Core/util/Macros.h | 12 +- .../Eigen/CXX11/src/Tensor/TensorDeviceType.h | 22 +- .../Eigen/CXX11/src/Tensor/TensorIntDiv.h | 16 +- 22 files changed, 184 insertions(+), 2066 deletions(-) delete mode 100644 tensorflow/examples/android/assets/imagenet_comp_graph_label_strings.txt delete mode 100644 tensorflow/examples/label_image/data/googlenet_labels.txt delete mode 100644 tensorflow/tensorboard/lib/svg/summary-icon.svg diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 31ec4913f8f..bdc93f922ac 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -301,7 +301,7 @@ tf_proto_library( go_api_version = 2, java_api_version = 2, py_api_version = 2, # TODO(irving): Handle 3 - visibility = ["//tensorflow:internal"], + visibility = ["//visibility:public"], ) cc_library( diff --git a/tensorflow/core/framework/op_def_util.cc b/tensorflow/core/framework/op_def_util.cc index 952d1e5c223..2c29da336f0 100644 --- a/tensorflow/core/framework/op_def_util.cc +++ b/tensorflow/core/framework/op_def_util.cc @@ -499,4 +499,43 @@ Status OpDefCompatible(const OpDef& old_op, const OpDef& new_op) { return Status::OK(); } +Status OpDefAddedDefaultsUnchanged(const OpDef& old_op, + const OpDef& penultimate_op, + const OpDef& new_op) { + AttrMap new_attrs, old_attrs; + FillAttrMap(old_op, &old_attrs); + FillAttrMap(new_op, &new_attrs); + + for (const auto& penultimate_attr : penultimate_op.attr()) { + const OpDef::AttrDef* old_attr = + gtl::FindPtrOrNull(old_attrs, penultimate_attr.name()); + if (old_attr != nullptr) continue; // attr wasn't added + const OpDef::AttrDef* new_attr = + gtl::FindPtrOrNull(new_attrs, penultimate_attr.name()); + + // These shouldn't happen if the op passed OpDefCompatible(). + if (new_attr == nullptr) { + return errors::InvalidArgument("Missing attr '", penultimate_attr.name(), + "' in op: ", SummarizeOpDef(new_op)); + } + if (!penultimate_attr.has_default_value() || + !new_attr->has_default_value()) { + return errors::InvalidArgument("Missing default for attr '", + penultimate_attr.name(), "' in op: ", + SummarizeOpDef(new_op)); + } + + // Actually test that the attr's default value hasn't changed. + if (!AreAttrValuesEqual(penultimate_attr.default_value(), + new_attr->default_value())) { + return errors::InvalidArgument( + "Can't change default value for attr '", penultimate_attr.name(), + "' from ", SummarizeAttrValue(penultimate_attr.default_value()), + " in op: ", SummarizeOpDef(new_op)); + } + } + + return Status::OK(); +} + } // namespace tensorflow diff --git a/tensorflow/core/framework/op_def_util.h b/tensorflow/core/framework/op_def_util.h index b2096ed5338..d7e6af755d0 100644 --- a/tensorflow/core/framework/op_def_util.h +++ b/tensorflow/core/framework/op_def_util.h @@ -32,6 +32,13 @@ string SummarizeOpDef(const OpDef& op_def); // REQUIRES: old_op and new_op must pass validation. Status OpDefCompatible(const OpDef& old_op, const OpDef& new_op); +// Returns an error if any attr in penultimate_op that is not in old_op +// has a different default value in new_op. In general it is not safe +// to change the default for an attr that has been added to an op. +Status OpDefAddedDefaultsUnchanged(const OpDef& old_op, + const OpDef& penultimate_op, + const OpDef& new_op); + } // namespace tensorflow #endif // TENSORFLOW_FRAMEWORK_OP_DEF_UTIL_H_ diff --git a/tensorflow/core/graph/graph_partition.cc b/tensorflow/core/graph/graph_partition.cc index 1571790e59f..a80e322fa5f 100644 --- a/tensorflow/core/graph/graph_partition.cc +++ b/tensorflow/core/graph/graph_partition.cc @@ -996,6 +996,10 @@ Status Partition(const PartitionOptions& opts, Graph* g, if (!edge->IsControlEdge() && IsRefType(src->output_type(edge->src_output()))) { + AddNodeAttr("_start_time", recv_start_time, recv); + if (real_recv != recv) { + AddNodeAttr("_start_time", recv_start_time, real_recv); + } // If src is of ref type and the edge is not a control edge, dst has // read semantics and therefore we must control the recv. ref_recvs.push_back(real_recv); diff --git a/tensorflow/examples/android/README.md b/tensorflow/examples/android/README.md index e115c0a6098..b209f1a01f9 100644 --- a/tensorflow/examples/android/README.md +++ b/tensorflow/examples/android/README.md @@ -5,9 +5,7 @@ This folder contains a simple camera-based demo application utilizing Tensorflow ## Description This demo uses a Google Inception model to classify camera frames in real-time, -displaying the top results in an overlay on the camera image. See -[`assets/imagenet_comp_graph_label_strings.txt`](assets/imagenet_comp_graph_label_strings.txt) -for the possible classifications. +displaying the top results in an overlay on the camera image. ## To build/install/run @@ -21,7 +19,21 @@ installed the NDK and SDK. Otherwise an error such as: "The external label '//external:android/sdk' is not bound to anything" will be reported. -To build the APK, run this from your workspace root: +The TensorFlow `GraphDef` that contains the model definition and weights +is not packaged in the repo because of its size. Instead, you must +first download the file to the `assets` directory in the source tree: + +```bash +$ wget https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip -O tensorflow/examples/android/assets/inception5h.zip + +$ unzip tensorflow/examples/android/assets/inception5h.zip -d tensorflow/examples/android/assets/ +``` + +The labels file describing the possible classification will also be in the +assets directory. + +Then, after editing your WORKSPACE file, you must build the APK. Run this from +your workspace root: ```bash $ bazel build //tensorflow/examples/android:tensorflow_demo -c opt --copt=-mfpu=neon diff --git a/tensorflow/examples/android/assets/imagenet_comp_graph_label_strings.txt b/tensorflow/examples/android/assets/imagenet_comp_graph_label_strings.txt deleted file mode 100644 index 0ac5a169d92..00000000000 --- a/tensorflow/examples/android/assets/imagenet_comp_graph_label_strings.txt +++ /dev/null @@ -1,1001 +0,0 @@ -dummy -kit fox -English setter -Siberian husky -Australian terrier -English springer -grey whale -lesser panda -Egyptian cat -ibex -Persian cat -cougar -gazelle -porcupine -sea lion -malamute -badger -Great Dane -Walker hound -Welsh springer spaniel -whippet -Scottish deerhound -killer whale -mink -African elephant -Weimaraner -soft-coated wheaten terrier -Dandie Dinmont -red wolf -Old English sheepdog -jaguar -otterhound -bloodhound -Airedale -hyena -meerkat -giant schnauzer -titi -three-toed sloth -sorrel -black-footed ferret -dalmatian -black-and-tan coonhound -papillon -skunk -Staffordshire bullterrier -Mexican hairless -Bouvier des Flandres -weasel -miniature poodle -Cardigan -malinois -bighorn -fox squirrel -colobus -tiger cat -Lhasa -impala -coyote -Yorkshire terrier -Newfoundland -brown bear -red fox -Norwegian elkhound -Rottweiler -hartebeest -Saluki -grey fox -schipperke -Pekinese -Brabancon griffon -West Highland white terrier -Sealyham terrier -guenon -mongoose -indri -tiger -Irish wolfhound -wild boar -EntleBucher -zebra -ram -French bulldog -orangutan -basenji -leopard -Bernese mountain dog -Maltese dog -Norfolk terrier -toy terrier -vizsla -cairn -squirrel monkey -groenendael -clumber -Siamese cat -chimpanzee -komondor -Afghan hound -Japanese spaniel -proboscis monkey -guinea pig -white wolf -ice bear -gorilla -borzoi -toy poodle -Kerry blue terrier -ox -Scotch terrier -Tibetan mastiff -spider monkey -Doberman -Boston bull -Greater Swiss Mountain dog -Appenzeller -Shih-Tzu -Irish water spaniel -Pomeranian -Bedlington terrier -warthog -Arabian camel -siamang -miniature schnauzer -collie -golden retriever -Irish terrier -affenpinscher -Border collie -hare -boxer -silky terrier -beagle -Leonberg -German short-haired pointer -patas -dhole -baboon -macaque -Chesapeake Bay retriever -bull mastiff -kuvasz -capuchin -pug -curly-coated retriever -Norwich terrier -flat-coated retriever -hog -keeshond -Eskimo dog -Brittany spaniel -standard poodle -Lakeland terrier -snow leopard -Gordon setter -dingo -standard schnauzer -hamster -Tibetan terrier -Arctic fox -wire-haired fox terrier -basset -water buffalo -American black bear -Angora -bison -howler monkey -hippopotamus -chow -giant panda -American Staffordshire terrier -Shetland sheepdog -Great Pyrenees -Chihuahua -tabby -marmoset -Labrador retriever -Saint Bernard -armadillo -Samoyed -bluetick -redbone -polecat -marmot -kelpie -gibbon -llama -miniature pinscher -wood rabbit -Italian greyhound -lion -cocker spaniel -Irish setter -dugong -Indian elephant -beaver -Sussex spaniel -Pembroke -Blenheim spaniel -Madagascar cat -Rhodesian ridgeback -lynx -African hunting dog -langur -Ibizan hound -timber wolf -cheetah -English foxhound -briard -sloth bear -Border terrier -German shepherd -otter -koala -tusker -echidna -wallaby -platypus -wombat -revolver -umbrella -schooner -soccer ball -accordion -ant -starfish -chambered nautilus -grand piano -laptop -strawberry -airliner -warplane -airship -balloon -space shuttle -fireboat -gondola -speedboat -lifeboat -canoe -yawl -catamaran -trimaran -container ship -liner -pirate -aircraft carrier -submarine -wreck -half track -tank -missile -bobsled -dogsled -bicycle-built-for-two -mountain bike -freight car -passenger car -barrow -shopping cart -motor scooter -forklift -electric locomotive -steam locomotive -amphibian -ambulance -beach wagon -cab -convertible -jeep -limousine -minivan -Model T -racer -sports car -go-kart -golfcart -moped -snowplow -fire engine -garbage truck -pickup -tow truck -trailer truck -moving van -police van -recreational vehicle -streetcar -snowmobile -tractor -mobile home -tricycle -unicycle -horse cart -jinrikisha -oxcart -bassinet -cradle -crib -four-poster -bookcase -china cabinet -medicine chest -chiffonier -table lamp -file -park bench -barber chair -throne -folding chair -rocking chair -studio couch -toilet seat -desk -pool table -dining table -entertainment center -wardrobe -Granny Smith -orange -lemon -fig -pineapple -banana -jackfruit -custard apple -pomegranate -acorn -hip -ear -rapeseed -corn -buckeye -organ -upright -chime -drum -gong -maraca -marimba -steel drum -banjo -cello -violin -harp -acoustic guitar -electric guitar -cornet -French horn -trombone -harmonica -ocarina -panpipe -bassoon -oboe -sax -flute -daisy -yellow lady's slipper -cliff -valley -alp -volcano -promontory -sandbar -coral reef -lakeside -seashore -geyser -hatchet -cleaver -letter opener -plane -power drill -lawn mower -hammer -corkscrew -can opener -plunger -screwdriver -shovel -plow -chain saw -cock -hen -ostrich -brambling -goldfinch -house finch -junco -indigo bunting -robin -bulbul -jay -magpie -chickadee -water ouzel -kite -bald eagle -vulture -great grey owl -black grouse -ptarmigan -ruffed grouse -prairie chicken -peacock -quail -partridge -African grey -macaw -sulphur-crested cockatoo -lorikeet -coucal -bee eater -hornbill -hummingbird -jacamar -toucan -drake -red-breasted merganser -goose -black swan -white stork -black stork -spoonbill -flamingo -American egret -little blue heron -bittern -crane -limpkin -American coot -bustard -ruddy turnstone -red-backed sandpiper -redshank -dowitcher -oystercatcher -European gallinule -pelican -king penguin -albatross -great white shark -tiger shark -hammerhead -electric ray -stingray -barracouta -coho -tench -goldfish -eel -rock beauty -anemone fish -lionfish -puffer -sturgeon -gar -loggerhead -leatherback turtle -mud turtle -terrapin -box turtle -banded gecko -common iguana -American chameleon -whiptail -agama -frilled lizard -alligator lizard -Gila monster -green lizard -African chameleon -Komodo dragon -triceratops -African crocodile -American alligator -thunder snake -ringneck snake -hognose snake -green snake -king snake -garter snake -water snake -vine snake -night snake -boa constrictor -rock python -Indian cobra -green mamba -sea snake -horned viper -diamondback -sidewinder -European fire salamander -common newt -eft -spotted salamander -axolotl -bullfrog -tree frog -tailed frog -whistle -wing -paintbrush -hand blower -oxygen mask -snorkel -loudspeaker -microphone -screen -mouse -electric fan -oil filter -strainer -space heater -stove -guillotine -barometer -rule -odometer -scale -analog clock -digital clock -wall clock -hourglass -sundial -parking meter -stopwatch -digital watch -stethoscope -syringe -magnetic compass -binoculars -projector -sunglasses -loupe -radio telescope -bow -cannon [ground] -assault rifle -rifle -projectile -computer keyboard -typewriter keyboard -crane -lighter -abacus -cash machine -slide rule -desktop computer -hand-held computer -notebook -web site -harvester -thresher -printer -slot -vending machine -sewing machine -joystick -switch -hook -car wheel -paddlewheel -pinwheel -potter's wheel -gas pump -carousel -swing -reel -radiator -puck -hard disc -sunglass -pick -car mirror -solar dish -remote control -disk brake -buckle -hair slide -knot -combination lock -padlock -nail -safety pin -screw -muzzle -seat belt -ski -candle -jack-o'-lantern -spotlight -torch -neck brace -pier -tripod -maypole -mousetrap -spider web -trilobite -harvestman -scorpion -black and gold garden spider -barn spider -garden spider -black widow -tarantula -wolf spider -tick -centipede -isopod -Dungeness crab -rock crab -fiddler crab -king crab -American lobster -spiny lobster -crayfish -hermit crab -tiger beetle -ladybug -ground beetle -long-horned beetle -leaf beetle -dung beetle -rhinoceros beetle -weevil -fly -bee -grasshopper -cricket -walking stick -cockroach -mantis -cicada -leafhopper -lacewing -dragonfly -damselfly -admiral -ringlet -monarch -cabbage butterfly -sulphur butterfly -lycaenid -jellyfish -sea anemone -brain coral -flatworm -nematode -conch -snail -slug -sea slug -chiton -sea urchin -sea cucumber -iron -espresso maker -microwave -Dutch oven -rotisserie -toaster -waffle iron -vacuum -dishwasher -refrigerator -washer -Crock Pot -frying pan -wok -caldron -coffeepot -teapot -spatula -altar -triumphal arch -patio -steel arch bridge -suspension bridge -viaduct -barn -greenhouse -palace -monastery -library -apiary -boathouse -church -mosque -stupa -planetarium -restaurant -cinema -home theater -lumbermill -coil -obelisk -totem pole -castle -prison -grocery store -bakery -barbershop -bookshop -butcher shop -confectionery -shoe shop -tobacco shop -toyshop -fountain -cliff dwelling -yurt -dock -brass -megalith -bannister -breakwater -dam -chainlink fence -picket fence -worm fence -stone wall -grille -sliding door -turnstile -mountain tent -scoreboard -honeycomb -plate rack -pedestal -beacon -mashed potato -bell pepper -head cabbage -broccoli -cauliflower -zucchini -spaghetti squash -acorn squash -butternut squash -cucumber -artichoke -cardoon -mushroom -shower curtain -jean -carton -handkerchief -sandal -ashcan -safe -plate -necklace -croquet ball -fur coat -thimble -pajama -running shoe -cocktail shaker -chest -manhole cover -modem -tub -tray -balance beam -bagel -prayer rug -kimono -hot pot -whiskey jug -knee pad -book jacket -spindle -ski mask -beer bottle -crash helmet -bottlecap -tile roof -mask -maillot -Petri dish -football helmet -bathing cap -teddy bear -holster -pop bottle -photocopier -vestment -crossword puzzle -golf ball -trifle -suit -water tower -feather boa -cloak -red wine -drumstick -shield -Christmas stocking -hoopskirt -menu -stage -bonnet -meat loaf -baseball -face powder -scabbard -sunscreen -beer glass -hen-of-the-woods -guacamole -lampshade -wool -hay -bow tie -mailbag -water jug -bucket -dishrag -soup bowl -eggnog -mortar -trench coat -paddle -chain -swab -mixing bowl -potpie -wine bottle -shoji -bulletproof vest -drilling platform -binder -cardigan -sweatshirt -pot -birdhouse -hamper -ping-pong ball -pencil box -pay-phone -consomme -apron -punching bag -backpack -groom -bearskin -pencil sharpener -broom -mosquito net -abaya -mortarboard -poncho -crutch -Polaroid camera -space bar -cup -racket -traffic light -quill -radio -dough -cuirass -military uniform -lipstick -shower cap -monitor -oscilloscope -mitten -brassiere -French loaf -vase -milk can -rugby ball -paper towel -earthstar -envelope -miniskirt -cowboy hat -trolleybus -perfume -bathtub -hotdog -coral fungus -bullet train -pillow -toilet tissue -cassette -carpenter's kit -ladle -stinkhorn -lotion -hair spray -academic gown -dome -crate -wig -burrito -pill bottle -chain mail -theater curtain -window shade -barrel -washbasin -ballpoint -basketball -bath towel -cowboy boot -gown -window screen -agaric -cellular telephone -nipple -barbell -mailbox -lab coat -fire screen -minibus -packet -maze -pole -horizontal bar -sombrero -pickelhaube -rain barrel -wallet -cassette player -comic book -piggy bank -street sign -bell cote -fountain pen -Windsor tie -volleyball -overskirt -sarong -purse -bolo tie -bib -parachute -sleeping bag -television -swimming trunks -measuring cup -espresso -pizza -breastplate -shopping basket -wooden spoon -saltshaker -chocolate sauce -ballplayer -goblet -gyromitra -stretcher -water bottle -dial telephone -soap dispenser -jersey -school bus -jigsaw puzzle -plastic bag -reflex camera -diaper -Band Aid -ice lolly -velvet -tennis ball -gasmask -doormat -Loafer -ice cream -pretzel -quilt -maillot -tape player -clog -iPod -bolete -scuba diver -pitcher -matchstick -bikini -sock -CD player -lens cap -thatch -vault -beaker -bubble -cheeseburger -parallel bars -flagpole -coffee mug -rubber eraser -stole -carbonara -dumbbell \ No newline at end of file diff --git a/tensorflow/examples/label_image/README.md b/tensorflow/examples/label_image/README.md index fbad61a22fa..ef0825faaf1 100644 --- a/tensorflow/examples/label_image/README.md +++ b/tensorflow/examples/label_image/README.md @@ -6,15 +6,26 @@ to recognize objects in images. ## Description This demo uses a Google Inception model to classify image files that are passed -in on the command line. See -[`googlenet_labels.txt`](data/googlenet_labels.txt) -for the possible classifications, which are the 1,000 categories used in the -Imagenet competition. +in on the command line. ## To build/install/run -As long as you've managed to build the main TensorFlow framework, you should -have everything you need to run this example installed already. +The TensorFlow `GraphDef` that contains the model definition and weights +is not packaged in the repo because of its size. Instead, you must +first download the file to the `data` directory in the source tree: + +```bash +$ wget https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip -O tensorflow/examples/label_image/data/inception5h.zip + +$ unzip tensorflow/examples/label_image/data/inception5h.zip -d tensorflow/examples/label_image/data/ +``` + +Then, as long as you've managed to build the main TensorFlow framework, you +should have everything you need to run this example installed already. + +Once extracted, see the labels file in the data directory for the possible +classifications, which are the 1,000 categories used in the Imagenet +competition. To build it, run this command: diff --git a/tensorflow/examples/label_image/data/googlenet_labels.txt b/tensorflow/examples/label_image/data/googlenet_labels.txt deleted file mode 100644 index 0ac5a169d92..00000000000 --- a/tensorflow/examples/label_image/data/googlenet_labels.txt +++ /dev/null @@ -1,1001 +0,0 @@ -dummy -kit fox -English setter -Siberian husky -Australian terrier -English springer -grey whale -lesser panda -Egyptian cat -ibex -Persian cat -cougar -gazelle -porcupine -sea lion -malamute -badger -Great Dane -Walker hound -Welsh springer spaniel -whippet -Scottish deerhound -killer whale -mink -African elephant -Weimaraner -soft-coated wheaten terrier -Dandie Dinmont -red wolf -Old English sheepdog -jaguar -otterhound -bloodhound -Airedale -hyena -meerkat -giant schnauzer -titi -three-toed sloth -sorrel -black-footed ferret -dalmatian -black-and-tan coonhound -papillon -skunk -Staffordshire bullterrier -Mexican hairless -Bouvier des Flandres -weasel -miniature poodle -Cardigan -malinois -bighorn -fox squirrel -colobus -tiger cat -Lhasa -impala -coyote -Yorkshire terrier -Newfoundland -brown bear -red fox -Norwegian elkhound -Rottweiler -hartebeest -Saluki -grey fox -schipperke -Pekinese -Brabancon griffon -West Highland white terrier -Sealyham terrier -guenon -mongoose -indri -tiger -Irish wolfhound -wild boar -EntleBucher -zebra -ram -French bulldog -orangutan -basenji -leopard -Bernese mountain dog -Maltese dog -Norfolk terrier -toy terrier -vizsla -cairn -squirrel monkey -groenendael -clumber -Siamese cat -chimpanzee -komondor -Afghan hound -Japanese spaniel -proboscis monkey -guinea pig -white wolf -ice bear -gorilla -borzoi -toy poodle -Kerry blue terrier -ox -Scotch terrier -Tibetan mastiff -spider monkey -Doberman -Boston bull -Greater Swiss Mountain dog -Appenzeller -Shih-Tzu -Irish water spaniel -Pomeranian -Bedlington terrier -warthog -Arabian camel -siamang -miniature schnauzer -collie -golden retriever -Irish terrier -affenpinscher -Border collie -hare -boxer -silky terrier -beagle -Leonberg -German short-haired pointer -patas -dhole -baboon -macaque -Chesapeake Bay retriever -bull mastiff -kuvasz -capuchin -pug -curly-coated retriever -Norwich terrier -flat-coated retriever -hog -keeshond -Eskimo dog -Brittany spaniel -standard poodle -Lakeland terrier -snow leopard -Gordon setter -dingo -standard schnauzer -hamster -Tibetan terrier -Arctic fox -wire-haired fox terrier -basset -water buffalo -American black bear -Angora -bison -howler monkey -hippopotamus -chow -giant panda -American Staffordshire terrier -Shetland sheepdog -Great Pyrenees -Chihuahua -tabby -marmoset -Labrador retriever -Saint Bernard -armadillo -Samoyed -bluetick -redbone -polecat -marmot -kelpie -gibbon -llama -miniature pinscher -wood rabbit -Italian greyhound -lion -cocker spaniel -Irish setter -dugong -Indian elephant -beaver -Sussex spaniel -Pembroke -Blenheim spaniel -Madagascar cat -Rhodesian ridgeback -lynx -African hunting dog -langur -Ibizan hound -timber wolf -cheetah -English foxhound -briard -sloth bear -Border terrier -German shepherd -otter -koala -tusker -echidna -wallaby -platypus -wombat -revolver -umbrella -schooner -soccer ball -accordion -ant -starfish -chambered nautilus -grand piano -laptop -strawberry -airliner -warplane -airship -balloon -space shuttle -fireboat -gondola -speedboat -lifeboat -canoe -yawl -catamaran -trimaran -container ship -liner -pirate -aircraft carrier -submarine -wreck -half track -tank -missile -bobsled -dogsled -bicycle-built-for-two -mountain bike -freight car -passenger car -barrow -shopping cart -motor scooter -forklift -electric locomotive -steam locomotive -amphibian -ambulance -beach wagon -cab -convertible -jeep -limousine -minivan -Model T -racer -sports car -go-kart -golfcart -moped -snowplow -fire engine -garbage truck -pickup -tow truck -trailer truck -moving van -police van -recreational vehicle -streetcar -snowmobile -tractor -mobile home -tricycle -unicycle -horse cart -jinrikisha -oxcart -bassinet -cradle -crib -four-poster -bookcase -china cabinet -medicine chest -chiffonier -table lamp -file -park bench -barber chair -throne -folding chair -rocking chair -studio couch -toilet seat -desk -pool table -dining table -entertainment center -wardrobe -Granny Smith -orange -lemon -fig -pineapple -banana -jackfruit -custard apple -pomegranate -acorn -hip -ear -rapeseed -corn -buckeye -organ -upright -chime -drum -gong -maraca -marimba -steel drum -banjo -cello -violin -harp -acoustic guitar -electric guitar -cornet -French horn -trombone -harmonica -ocarina -panpipe -bassoon -oboe -sax -flute -daisy -yellow lady's slipper -cliff -valley -alp -volcano -promontory -sandbar -coral reef -lakeside -seashore -geyser -hatchet -cleaver -letter opener -plane -power drill -lawn mower -hammer -corkscrew -can opener -plunger -screwdriver -shovel -plow -chain saw -cock -hen -ostrich -brambling -goldfinch -house finch -junco -indigo bunting -robin -bulbul -jay -magpie -chickadee -water ouzel -kite -bald eagle -vulture -great grey owl -black grouse -ptarmigan -ruffed grouse -prairie chicken -peacock -quail -partridge -African grey -macaw -sulphur-crested cockatoo -lorikeet -coucal -bee eater -hornbill -hummingbird -jacamar -toucan -drake -red-breasted merganser -goose -black swan -white stork -black stork -spoonbill -flamingo -American egret -little blue heron -bittern -crane -limpkin -American coot -bustard -ruddy turnstone -red-backed sandpiper -redshank -dowitcher -oystercatcher -European gallinule -pelican -king penguin -albatross -great white shark -tiger shark -hammerhead -electric ray -stingray -barracouta -coho -tench -goldfish -eel -rock beauty -anemone fish -lionfish -puffer -sturgeon -gar -loggerhead -leatherback turtle -mud turtle -terrapin -box turtle -banded gecko -common iguana -American chameleon -whiptail -agama -frilled lizard -alligator lizard -Gila monster -green lizard -African chameleon -Komodo dragon -triceratops -African crocodile -American alligator -thunder snake -ringneck snake -hognose snake -green snake -king snake -garter snake -water snake -vine snake -night snake -boa constrictor -rock python -Indian cobra -green mamba -sea snake -horned viper -diamondback -sidewinder -European fire salamander -common newt -eft -spotted salamander -axolotl -bullfrog -tree frog -tailed frog -whistle -wing -paintbrush -hand blower -oxygen mask -snorkel -loudspeaker -microphone -screen -mouse -electric fan -oil filter -strainer -space heater -stove -guillotine -barometer -rule -odometer -scale -analog clock -digital clock -wall clock -hourglass -sundial -parking meter -stopwatch -digital watch -stethoscope -syringe -magnetic compass -binoculars -projector -sunglasses -loupe -radio telescope -bow -cannon [ground] -assault rifle -rifle -projectile -computer keyboard -typewriter keyboard -crane -lighter -abacus -cash machine -slide rule -desktop computer -hand-held computer -notebook -web site -harvester -thresher -printer -slot -vending machine -sewing machine -joystick -switch -hook -car wheel -paddlewheel -pinwheel -potter's wheel -gas pump -carousel -swing -reel -radiator -puck -hard disc -sunglass -pick -car mirror -solar dish -remote control -disk brake -buckle -hair slide -knot -combination lock -padlock -nail -safety pin -screw -muzzle -seat belt -ski -candle -jack-o'-lantern -spotlight -torch -neck brace -pier -tripod -maypole -mousetrap -spider web -trilobite -harvestman -scorpion -black and gold garden spider -barn spider -garden spider -black widow -tarantula -wolf spider -tick -centipede -isopod -Dungeness crab -rock crab -fiddler crab -king crab -American lobster -spiny lobster -crayfish -hermit crab -tiger beetle -ladybug -ground beetle -long-horned beetle -leaf beetle -dung beetle -rhinoceros beetle -weevil -fly -bee -grasshopper -cricket -walking stick -cockroach -mantis -cicada -leafhopper -lacewing -dragonfly -damselfly -admiral -ringlet -monarch -cabbage butterfly -sulphur butterfly -lycaenid -jellyfish -sea anemone -brain coral -flatworm -nematode -conch -snail -slug -sea slug -chiton -sea urchin -sea cucumber -iron -espresso maker -microwave -Dutch oven -rotisserie -toaster -waffle iron -vacuum -dishwasher -refrigerator -washer -Crock Pot -frying pan -wok -caldron -coffeepot -teapot -spatula -altar -triumphal arch -patio -steel arch bridge -suspension bridge -viaduct -barn -greenhouse -palace -monastery -library -apiary -boathouse -church -mosque -stupa -planetarium -restaurant -cinema -home theater -lumbermill -coil -obelisk -totem pole -castle -prison -grocery store -bakery -barbershop -bookshop -butcher shop -confectionery -shoe shop -tobacco shop -toyshop -fountain -cliff dwelling -yurt -dock -brass -megalith -bannister -breakwater -dam -chainlink fence -picket fence -worm fence -stone wall -grille -sliding door -turnstile -mountain tent -scoreboard -honeycomb -plate rack -pedestal -beacon -mashed potato -bell pepper -head cabbage -broccoli -cauliflower -zucchini -spaghetti squash -acorn squash -butternut squash -cucumber -artichoke -cardoon -mushroom -shower curtain -jean -carton -handkerchief -sandal -ashcan -safe -plate -necklace -croquet ball -fur coat -thimble -pajama -running shoe -cocktail shaker -chest -manhole cover -modem -tub -tray -balance beam -bagel -prayer rug -kimono -hot pot -whiskey jug -knee pad -book jacket -spindle -ski mask -beer bottle -crash helmet -bottlecap -tile roof -mask -maillot -Petri dish -football helmet -bathing cap -teddy bear -holster -pop bottle -photocopier -vestment -crossword puzzle -golf ball -trifle -suit -water tower -feather boa -cloak -red wine -drumstick -shield -Christmas stocking -hoopskirt -menu -stage -bonnet -meat loaf -baseball -face powder -scabbard -sunscreen -beer glass -hen-of-the-woods -guacamole -lampshade -wool -hay -bow tie -mailbag -water jug -bucket -dishrag -soup bowl -eggnog -mortar -trench coat -paddle -chain -swab -mixing bowl -potpie -wine bottle -shoji -bulletproof vest -drilling platform -binder -cardigan -sweatshirt -pot -birdhouse -hamper -ping-pong ball -pencil box -pay-phone -consomme -apron -punching bag -backpack -groom -bearskin -pencil sharpener -broom -mosquito net -abaya -mortarboard -poncho -crutch -Polaroid camera -space bar -cup -racket -traffic light -quill -radio -dough -cuirass -military uniform -lipstick -shower cap -monitor -oscilloscope -mitten -brassiere -French loaf -vase -milk can -rugby ball -paper towel -earthstar -envelope -miniskirt -cowboy hat -trolleybus -perfume -bathtub -hotdog -coral fungus -bullet train -pillow -toilet tissue -cassette -carpenter's kit -ladle -stinkhorn -lotion -hair spray -academic gown -dome -crate -wig -burrito -pill bottle -chain mail -theater curtain -window shade -barrel -washbasin -ballpoint -basketball -bath towel -cowboy boot -gown -window screen -agaric -cellular telephone -nipple -barbell -mailbox -lab coat -fire screen -minibus -packet -maze -pole -horizontal bar -sombrero -pickelhaube -rain barrel -wallet -cassette player -comic book -piggy bank -street sign -bell cote -fountain pen -Windsor tie -volleyball -overskirt -sarong -purse -bolo tie -bib -parachute -sleeping bag -television -swimming trunks -measuring cup -espresso -pizza -breastplate -shopping basket -wooden spoon -saltshaker -chocolate sauce -ballplayer -goblet -gyromitra -stretcher -water bottle -dial telephone -soap dispenser -jersey -school bus -jigsaw puzzle -plastic bag -reflex camera -diaper -Band Aid -ice lolly -velvet -tennis ball -gasmask -doormat -Loafer -ice cream -pretzel -quilt -maillot -tape player -clog -iPod -bolete -scuba diver -pitcher -matchstick -bikini -sock -CD player -lens cap -thatch -vault -beaker -bubble -cheeseburger -parallel bars -flagpole -coffee mug -rubber eraser -stole -carbonara -dumbbell \ No newline at end of file diff --git a/tensorflow/examples/label_image/main.cc b/tensorflow/examples/label_image/main.cc index e830ce34842..8b710e8c1ac 100644 --- a/tensorflow/examples/label_image/main.cc +++ b/tensorflow/examples/label_image/main.cc @@ -14,7 +14,8 @@ // customize it to use your own models or images by changing the file names at // the top of the main() function. // -// The googlenet_graph.pb file included by default is created from Inception. +// The model file specified in the README is a pre-trained version of +// an Inception (GoogleNet) model. #include @@ -48,12 +49,13 @@ using tensorflow::int32; TF_DEFINE_string(image, "tensorflow/examples/label_image/data/grace_hopper.jpg", "The image to classify (JPEG or PNG)."); -TF_DEFINE_string(graph, - "tensorflow/examples/label_image/data/googlenet_graph.pb", - "The location of the GraphDef file containing the protobuf" - " definition of the network."); +TF_DEFINE_string( + graph, "tensorflow/examples/label_image/data/tensorflow_inception_graph.pb", + "The location of the GraphDef file containing the protobuf" + " definition of the network."); TF_DEFINE_string(labels, - "tensorflow/examples/label_image/data/googlenet_labels.txt", + "tensorflow/examples/label_image/data/" + "imagenet_comp_graph_label_strings.txt", "A text file containing the labels of all the categories, one" " per line."); TF_DEFINE_int32(input_width, 224, "Width of the image the network expects."); diff --git a/tensorflow/g3doc/how_tos/graph_viz/index.md b/tensorflow/g3doc/how_tos/graph_viz/index.md index c2907b8461f..fd66e9ce872 100644 --- a/tensorflow/g3doc/how_tos/graph_viz/index.md +++ b/tensorflow/g3doc/how_tos/graph_viz/index.md @@ -5,7 +5,7 @@ TensorFlow computation graphs are powerful but complicated. The graph visualizat ![Visualization of a TensorFlow graph](./graph_vis_animation.gif "Visualization of a TensorFlow graph") *Visualization of a TensorFlow graph.* -To see your own graph, run TensorBoard pointing it to the log directory of the job, click on the graph tab on the top pane and select the appropriate run using the menu at the upper left corner. For in depth information on how to run TensorBoard and make sure you are logging all the necessary information, see [Summaries and TensorBoard](../../how_tos/summaries_and_tensorboard/index.md). +To see your own graph, run TensorBoard pointing it to the log directory of the job, click on the graph tab on the top pane and select the appropriate run using the menu at the upper left corner. For in depth information on how to run TensorBoard and make sure you are logging all the necessary information, see [TensorBoard: Visualizing Learning](../../how_tos/summaries_and_tensorboard/index.md). ## Name scoping and nodes diff --git a/tensorflow/g3doc/how_tos/summaries_and_tensorboard/index.md b/tensorflow/g3doc/how_tos/summaries_and_tensorboard/index.md index 39108d29b7a..79225fb692e 100644 --- a/tensorflow/g3doc/how_tos/summaries_and_tensorboard/index.md +++ b/tensorflow/g3doc/how_tos/summaries_and_tensorboard/index.md @@ -107,4 +107,4 @@ not contain any data relevant to that tab, a message will be displayed indicating how to serialize data that is applicable to that tab. For in depth information on how to use the *graph* tab to visualize your graph, -see [TensorBoard: Visualizing your graph](../../how_tos/graph_viz/index.md). +see [TensorBoard: Graph Visualization](../../how_tos/graph_viz/index.md). diff --git a/tensorflow/g3doc/tutorials/mnist/input_data.py b/tensorflow/g3doc/tutorials/mnist/input_data.py index 890a552010f..fc7d64feeab 100644 --- a/tensorflow/g3doc/tutorials/mnist/input_data.py +++ b/tensorflow/g3doc/tutorials/mnist/input_data.py @@ -21,7 +21,7 @@ def maybe_download(filename, work_directory): if not os.path.exists(filepath): filepath, _ = urllib.request.urlretrieve(SOURCE_URL + filename, filepath) statinfo = os.stat(filepath) - print('Succesfully downloaded', filename, statinfo.st_size, 'bytes.') + print('Successfully downloaded', filename, statinfo.st_size, 'bytes.') return filepath diff --git a/tensorflow/python/training/input.py b/tensorflow/python/training/input.py index a712075d077..4c6cf6e0d69 100644 --- a/tensorflow/python/training/input.py +++ b/tensorflow/python/training/input.py @@ -295,6 +295,11 @@ def batch(tensor_list, batch_size, num_threads=1, capacity=32, output will have shape `[batch_size, x, y, z]`. The `capacity` argument controls the how long the prefetching is allowed to grow the queues. + *N.B.:* You must ensure that either (i) the `shapes` argument is + passed, or (ii) all of the tensors in `tensor_list` must have + fully-defined shapes. `ValueError` will be raised if neither of + these conditions holds. + Args: tensor_list: The list of tensors to enqueue. batch_size: The new batch size pulled from the queue. @@ -307,6 +312,10 @@ def batch(tensor_list, batch_size, num_threads=1, capacity=32, Returns: A list of tensors with the same number and types as `tensor_list`. + + Raises: + ValueError: If the `shapes` are not specified, and cannot be + inferred from the elements of `tensor_list`. """ with ops.op_scope(tensor_list, name, "batch") as name: tensor_list = _validate(tensor_list) @@ -356,6 +365,11 @@ def batch_join(tensor_list_list, batch_size, capacity=32, enqueue_many=False, The `capacity` argument controls the how long the prefetching is allowed to grow the queues. + *N.B.:* You must ensure that either (i) the `shapes` argument is + passed, or (ii) all of the tensors in `tensor_list_list` must have + fully-defined shapes. `ValueError` will be raised if neither of + these conditions holds. + Args: tensor_list_list: A list of tuples of tensors to enqueue. batch_size: An integer. The new batch size pulled from the queue. @@ -369,6 +383,10 @@ def batch_join(tensor_list_list, batch_size, capacity=32, enqueue_many=False, Returns: A list of tensors with the same number and types as `tensor_list_list[i]`. + + Raises: + ValueError: If the `shapes` are not specified, and cannot be + inferred from the elements of `tensor_list_list`. """ with ops.op_scope(_flatten(tensor_list_list), name, "batch_join") as name: tensor_list_list = _validate_join(tensor_list_list) @@ -421,6 +439,11 @@ def shuffle_batch(tensor_list, batch_size, capacity, min_after_dequeue, min_after_dequeue=10000) ``` + *N.B.:* You must ensure that either (i) the `shapes` argument is + passed, or (ii) all of the tensors in `tensor_list` must have + fully-defined shapes. `ValueError` will be raised if neither of + these conditions holds. + Args: tensor_list: The list of tensors to enqueue. batch_size: The new batch size pulled from the queue. @@ -436,6 +459,10 @@ def shuffle_batch(tensor_list, batch_size, capacity, min_after_dequeue, Returns: A list of tensors with the same number and types as `tensor_list`. + + Raises: + ValueError: If the `shapes` are not specified, and cannot be + inferred from the elements of `tensor_list`. """ with ops.op_scope(tensor_list, name, "shuffle_batch") as name: tensor_list = _validate(tensor_list) @@ -489,6 +516,11 @@ def shuffle_batch_join(tensor_list_list, batch_size, capacity, The `capacity` argument controls the how long the prefetching is allowed to grow the queues. + *N.B.:* You must ensure that either (i) the `shapes` argument is + passed, or (ii) all of the tensors in `tensor_list_list` must have + fully-defined shapes. `ValueError` will be raised if neither of + these conditions holds. + Args: tensor_list_list: A list of tuples of tensors to enqueue. batch_size: An integer. The new batch size pulled from the queue. @@ -504,6 +536,10 @@ def shuffle_batch_join(tensor_list_list, batch_size, capacity, Returns: A list of tensors with the same number and types as `tensor_list_list[i]`. + + Raises: + ValueError: If the `shapes` are not specified, and cannot be + inferred from the elements of `tensor_list_list`. """ with ops.op_scope( _flatten(tensor_list_list), name, "shuffle_batch_join") as name: diff --git a/tensorflow/python/training/saver.py b/tensorflow/python/training/saver.py index 8f142edb4bb..5bf800a5080 100644 --- a/tensorflow/python/training/saver.py +++ b/tensorflow/python/training/saver.py @@ -884,9 +884,9 @@ def latest_checkpoint(checkpoint_dir, latest_filename=None): # Pick the latest checkpoint based on checkpoint state. ckpt = get_checkpoint_state(checkpoint_dir, latest_filename) if ckpt and ckpt.model_checkpoint_path: - checkpoint_full_path = os.path.join( + checkpoint_pattern = os.path.join( checkpoint_dir, ckpt.model_checkpoint_path) - if gfile.Exists(checkpoint_full_path): - return checkpoint_full_path + if gfile.Glob(checkpoint_pattern): + return checkpoint_pattern return None diff --git a/tensorflow/python/training/saver_test.py b/tensorflow/python/training/saver_test.py index 76ca4d90d6b..4b1701e1c5c 100644 --- a/tensorflow/python/training/saver_test.py +++ b/tensorflow/python/training/saver_test.py @@ -310,6 +310,10 @@ class SaveRestoreShardedTest(tf.test.TestCase): self.assertEqual(10, v0.eval()) self.assertEqual(20, v1.eval()) + self.assertEqual( + tf.train.latest_checkpoint(self.get_temp_dir()), + os.path.join(self.get_temp_dir(), "sharded-?????-of-00002")) + def testSaverDef(self): with self.test_session(): v0 = tf.Variable(123, name="v0") diff --git a/tensorflow/tensorboard/components/tf-graph-common/lib/scene/annotation.ts b/tensorflow/tensorboard/components/tf-graph-common/lib/scene/annotation.ts index 82609e8652d..7f6c9ff4b64 100644 --- a/tensorflow/tensorboard/components/tf-graph-common/lib/scene/annotation.ts +++ b/tensorflow/tensorboard/components/tf-graph-common/lib/scene/annotation.ts @@ -100,11 +100,10 @@ function annotationToClassName(annotationType: render.AnnotationType) { function buildShape(aGroup, a: render.Annotation, sceneBehavior) { if (a.annotationType === tf.graph.render.AnnotationType.SUMMARY) { - let image = scene.selectOrCreateChild(aGroup, "image"); - image.attr({ - "xlink:href": sceneBehavior.resolveUrl("../../lib/svg/summary-icon.svg"), - "height": "12px", - "width": "12px", + let summary = scene.selectOrCreateChild(aGroup, "use"); + summary.attr({ + "class": "summary", + "xlink:href": "#summary-icon", "cursor": "pointer" }); } else { @@ -197,7 +196,7 @@ function update(aGroup, d: render.RenderNodeInformation, a: render.Annotation, // If there is an image, we adjust the location of the image to be vertically // centered with the node and horizontally centered between the arrow and the // text label. - aGroup.select("image").transition().attr({ + aGroup.select("use.summary").transition().attr({ x: d.x + a.dx - 3, y: d.y + a.dy - 6 }); diff --git a/tensorflow/tensorboard/components/tf-graph/tf-graph-controls.html b/tensorflow/tensorboard/components/tf-graph/tf-graph-controls.html index 4a6901e9118..49a8d58e4d1 100644 --- a/tensorflow/tensorboard/components/tf-graph/tf-graph-controls.html +++ b/tensorflow/tensorboard/components/tf-graph/tf-graph-controls.html @@ -162,6 +162,14 @@ svg.icon { clear: both; } + + + + + + + +
@@ -301,9 +309,8 @@ svg.icon { - - + + Summary @@ -357,11 +364,6 @@ svg.icon { (function() { // Private scope. Polymer({ is: 'tf-graph-controls', - ready: function() { - // Set the url to download the summary icon. - d3.select(this.$['summary-icon']) - .attr('xlink:href', this.resolveUrl('../../lib/svg/summary-icon.svg')); - }, properties: { // Public API. hasStats: { diff --git a/tensorflow/tensorboard/components/tf-graph/tf-graph-icon.html b/tensorflow/tensorboard/components/tf-graph/tf-graph-icon.html index d752bb583fd..005ad16f2b3 100644 --- a/tensorflow/tensorboard/components/tf-graph/tf-graph-icon.html +++ b/tensorflow/tensorboard/components/tf-graph/tf-graph-icon.html @@ -12,8 +12,9 @@