TensorFlow.js model converter frozen model unrecognized arguments - tensorflow.js

I am trying to convert the frozen model to TensorFlowjs model using TensorFlowjs converter but i am getting this "unrecognized arguments"
Tensorflowjs converter version I tried is 0.8.6 and the latest one but getting the same error.
tensorflowjs_converter --input_format=tf_frozen_model --output_node_names = "detection_boxes, detection_scores, detection_classes, num_detections" ./models tfjsmodel
error : TensorFlow.js model converters.: error: unrecognized arguments: detection_classes, num_detections ./models tfjsmodel
You can find model here : https://drive.google.com/file/d/1qc4a6AgYp0TM0mXVwWgJFrHuqhcL9zgJ/view?usp=sharing

I think it is because of the space between the command option output_node_names and the argument "detection_boxes, detection_scores, detection_classes, num_detections"
tensorflowjs_converter --input_format=tf_frozen_model --output_node_names="detection_boxes, detection_scores, detection_classes, num_detections" ./models tfjsmodel

Related

Error in loading YOLOv4 TFlite model in Flutter

I have loaded my custom YOLOv4 TFlite model on Flutter based on this repo by TexMexMax. I already followed all the instructions in the README.md but still got these errors:
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/tflite_flutter-0.5.0/lib/src/delegates/gpu_delegate.dart:58:10: Error: The getter 'addressOf' isn't defined for the class 'TfLiteGpuDelegateOptionsV2'.
- 'TfLiteGpuDelegateOptionsV2' is from 'package:tflite_flutter/src/bindings/types.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/tflite_flutter-0.5.0/lib/src/bindings/types.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
.addressOf);
^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2992:7: Error: Struct 'STATSTG' is empty. Empty structs and unions are undefined behavior.
class STATSTG extends Struct {}
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/tflite_flutter-0.5.0/lib/src/bindings/types.dart:6:7: Error: Struct 'TfLiteInterpreter' is empty. Empty structs and unions are undefined behavior.
class TfLiteInterpreter extends Struct {}
^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Error: Expected type 'T' to be a valid and instantiated subtype of 'NativeType'.
final int totalSize = count * sizeOf<T>();
There are list of errors similar to the above but with different functions(?). Then the errors ended with below:
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 10s
Exception: Gradle task assembleDebug failed with exit code 1
I also tried some of the solutions here but still no luck. Apparently, according to this author, the TFLite plugins in Flutter doesn't support YOLOv4 yet hence I followed the repo by TexMaxMex since they had modified something so that Flutter could support the YOLOv4 model but then I encountered those errors.
Hope someone could enlighten me why is this happening and what should I do to assist the problems. Thank you in advance!

How to use projection with GAE?

I have the following code:
employees = Employee.all()
employees.projection('first_name')
employees.filter('passport_id =', passport_id)
employees.order('-added')
results = employees.fetch(5)
Second line is not allowed:
AttributeError: 'Query' object has no attribute 'projection'
Another approach also returns the error:
employees = db.Query(Employee, projection=('first_name'))
TypeError: __init__() got an unexpected keyword argument 'projection'
But if I read the doc correctly, it should be supported.
Which version of AppEngine SDK are you running? projection queries were added in version 1.6.5

cakeRequest resulting in "Undefined property" error

I am working with a request object:
$this->request
and received the following error:
Undefined property: EventsController::$request
Are you certain you are running Cake 2.0 and not 1.3? What's the output of Configure::version()?
Cake only throws this error when the property is actually undefined. In 2.0 you should get a fully populated request object. Using $this->request in 1.3 throws the error you're receiving.

Silverlight 4: How to reference class from another assembly

In XAML-file of the SquadView page (VfmElitaSilverlightClientView.Pages.SquadView) I am using custom value converter. XAML-file is in "VfmElitaSilverlightClientView" namespace. Separate folder was created for converter and it is in "VfmElitaSilverlightClientView.Converter" namespace (in the same assembly). To use converter following code is used in XAML:
xmlns:Converter="clr-namespace:VfmElitaSilverlightClientView.Converter"
...
<NavigationControls:Page.Resources>
<Converter:BooleanToVisibilityConverter x:Key="resourceBooleanToVisibilityConverter" />
</NavigationControls:Page.Resources>
All works fine. Here I want to move converter class into a custom separate assembly "SilverlightCommonView" and class himself will be in "SilverlightCommonView.Converter" namespace. The XAML code is changed to the following:
xmlns:Converter="clr-namespace:SilverlightCommonView.Converter;assembly=SilverlightCommonView"
...
<NavigationControls:Page.Resources>
<Converter:BooleanToVisibilityConverter x:Key="resourceBooleanToVisibilityConverter" />
</NavigationControls:Page.Resources>
In this case when application throws following exception:
An unhandled exception ('Unhandled
Error in Silverlight Application...
Code: 4004 Category:
ManagedRuntimeError Message:
Microsoft.Practices.Unity.ResolutionFailedException:
Resolution of dependency failed, type="VfmElitaSilverlightClientView.Pages.SquadView",
name="(none)".
Exception occurred while: Calling constructor
VfmElitaSilverlightClientView.Pages.SquadView(). Exception is: XamlParseException -
The type 'BooleanToVisibilityConverter' was not found because
'cl...:SilverlightCommonView.Converter;assembly=SilverlightCommonView'
is an unknown namespace.
It's unclear why specified namespace is unknown (those assembly is referenced by the current one).
Please advise.
Any thoughts are welcome.
I'd bet you do not have an assembly reference to your shared/common project from your application project.

How to activate datanucleus java-type extensions for JPA?

I have a simple JPA #Entity that has a property of type
java.util.Locale.
When I try and persist this, I get the following error:
java.lang.IllegalArgumentException: locale: java.util.Locale is not a supported property type.
at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedSingleValue( DataTypeUtils.java:174)
...
In the appengine SDK (1.3.1), datanucleus-core-1.1.5.jar contains
plugin.xml which contains the following type conversion "extension":
<java-type name="java.util.Locale" persistent="true" embedded="true"
string-converter="org.datanucleus.store.types.LocaleStringConverter"/>
How do I "activate" this type converter in my #Entity class?
This seems to be a significant limitation of Google's use of datanucleus. See the following (2nd last heading):
http://datanucleus.blogspot.com/2010/01/gaej-and-jdojpa.html

Resources